Index: trunk/phase3/tests/qunit/suites/resources/mediawiki.util/mediawiki.util.js |
— | — | @@ -50,7 +50,7 @@ |
51 | 51 | test( 'addCSS', function(){ |
52 | 52 | expect(3); |
53 | 53 | |
54 | | - window.a = mw.util.addCSS( '#bodyContent { visibility: hidden; }' ); |
| 54 | + var a = mw.util.addCSS( '#bodyContent { visibility: hidden; }' ); |
55 | 55 | ok( a, 'function works' ); |
56 | 56 | deepEqual( a.disabled, false, 'property "disabled" is available and set to false' ); |
57 | 57 | |
Index: trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.js |
— | — | @@ -64,8 +64,8 @@ |
65 | 65 | deepEqual( 'anotherGlobalMapChecker' in window, true, 'new mw.Map( true ) did store its values in the global window object' ); |
66 | 66 | ok( window.anotherGlobalMapChecker, 'new mw.Map( true ) did store its values in the global window object' ); |
67 | 67 | |
68 | | - // Clean up |
69 | | - delete window.anotherGlobalMapChecker; |
| 68 | + // Whitelist this global variable for QUnit 'noglobal' mode |
| 69 | + QUnit.config.pollution.push( 'anotherGlobalMapChecker' ); |
70 | 70 | }); |
71 | 71 | |
72 | 72 | test( 'mw.config', function(){ |
— | — | @@ -111,6 +111,7 @@ |
112 | 112 | deepEqual( goodbye.exists(), false, 'Message.exists() returns false for inexisting messages' ); |
113 | 113 | |
114 | 114 | equal( goodbye.toString(), '<goodbye>', 'Message.toString() returns <key> if key does not exist' ); |
| 115 | + |
115 | 116 | }); |
116 | 117 | |
117 | 118 | test( 'mw.msg', function(){ |
Index: trunk/phase3/resources/mediawiki/mediawiki.js |
— | — | @@ -246,11 +246,12 @@ |
247 | 247 | * Gets a message object, similar to wfMessage() |
248 | 248 | * |
249 | 249 | * @param key string Key of message to get |
250 | | - * @param parameters mixed First argument in a list of variadic arguments, |
| 250 | + * @param parameter_1 mixed First argument in a list of variadic arguments, |
251 | 251 | * each a parameter for $N replacement in messages. |
252 | 252 | * @return Message |
253 | 253 | */ |
254 | 254 | this.message = function( key, parameter_1 /* [, parameter_2] */ ) { |
| 255 | + var parameters; |
255 | 256 | // Support variadic arguments |
256 | 257 | if ( parameter_1 !== undefined ) { |
257 | 258 | parameters = $.makeArray( arguments ); |