From 400f4f5b06f09f54077831e972279d03d9054499 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Mon, 12 Dec 2011 10:23:04 +0000 Subject: [PATCH] comments from r101845 on jquery.client.Test --- .../qunit/suites/resources/jquery/jquery.client.test.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/qunit/suites/resources/jquery/jquery.client.test.js b/tests/qunit/suites/resources/jquery/jquery.client.test.js index c0e869232c..99c3070d8e 100644 --- a/tests/qunit/suites/resources/jquery/jquery.client.test.js +++ b/tests/qunit/suites/resources/jquery/jquery.client.test.js @@ -5,7 +5,10 @@ test( '-- Initial check', function() { ok( jQuery.client, 'jQuery.client defined' ); }); -var uacount = 0, uas = (function() { +/** Number of user-agent defined */ +var uacount = 0; + +var uas = (function() { // Object keyed by userAgent. Value is an array (human-readable name, client-profile object, navigator.platform value) // Info based on results from http://toolserver.org/~krinkle/testswarm/job/174/ @@ -241,6 +244,8 @@ test( 'profile return validation for current user agent', function() { }); // Example from WikiEditor +// Make sure to use raw numbers, a string like "7.0" would fail on a +// version 10 browser since in string comparaison "10" is before "7.0" :) var testMap = { 'ltr': { 'msie': [['>=', 7.0]], @@ -278,7 +283,7 @@ test( 'test', function() { }); test( 'User-agent matches against WikiEditor\'s compatibility map', function() { - expect( uacount * 2 ); + expect( uacount * 2 ); // double since we test both LTR and RTL // Loop through and run tests $.each( uas, function( agent, data ) { -- 2.20.1