http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89610
Revision: 89610
Author: krinkle
Date: 2011-06-06 21:10:42 +0000 (Mon, 06 Jun 2011)
Log Message:
-----------
Fix bug that brakes the 'jquery.tabIndex > firstTabIndex' test in IE8/IE9. Some
values default to a "unknown" string.
Modified Paths:
--------------
trunk/phase3/tests/qunit/suites/resources/jquery/jquery.client.js
Modified: trunk/phase3/tests/qunit/suites/resources/jquery/jquery.client.js
===================================================================
--- trunk/phase3/tests/qunit/suites/resources/jquery/jquery.client.js
2011-06-06 21:10:36 UTC (rev 89609)
+++ trunk/phase3/tests/qunit/suites/resources/jquery/jquery.client.js
2011-06-06 21:10:42 UTC (rev 89610)
@@ -7,15 +7,19 @@
test( 'profile', function(){
expect(7);
- var profile = $.client.profile();
+ var p = $.client.profile();
+ var unk = 'unknown';
+ var unkOrType = function( val, type ) {
+ return typeof val === type || val === unk;
+ };
- equal( typeof profile, 'object', 'profile() returns an object' );
- equal( typeof profile.layout, 'string', 'profile.layout is a string' );
- equal( typeof profile.layoutVersion, 'number', 'profile.layoutVersion
is a number' );
- equal( typeof profile.platform, 'string', 'profile.platform is a
string' );
- equal( typeof profile.version, 'string', 'profile.version is a string'
);
- equal( typeof profile.versionBase, 'string', 'profile.versionBase is a
number' );
- equal( typeof profile.versionNumber, 'number', 'profile.versionNumber
is a number' );
+ equal( typeof p, 'object', 'profile() returns an object' );
+ ok( unkOrType( p.layout, 'string' ), 'p.layout is a string (or
"unknown")' );
+ ok( unkOrType( p.layoutVersion, 'number' ), 'p.layoutVersion is a
number (or "unknown")' );
+ ok( unkOrType( p.platform, 'string' ), 'p.platform is a string (or
"unknown")' );
+ ok( unkOrType( p.version, 'string' ), 'p.version is a string (or
"unknown")' );
+ ok( unkOrType( p.versionBase, 'string' ), 'p.versionBase is a string
(or "unknown")' );
+ equal( typeof p.versionNumber, 'number', 'p.versionNumber is a number'
);
});
test( 'test', function(){
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs