Index: trunk/phase3/tests/qunit/index.html |
— | — | @@ -38,6 +38,7 @@ |
39 | 39 | var scriptPath = pathParts.join( '/' ); |
40 | 40 | |
41 | 41 | mw.config.set({ |
| 42 | + "wgServer": location.protocol + '//' + location.host, |
42 | 43 | "wgScriptPath": scriptPath, |
43 | 44 | "wgLoadScript": scriptPath + '/load.php', |
44 | 45 | "stylepath": scriptPath + '/skins', |
Index: trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.test.js |
— | — | @@ -175,19 +175,9 @@ |
176 | 176 | |
177 | 177 | expect(2); |
178 | 178 | |
179 | | - var server = mw.config.get( 'wgServer' ), |
180 | | - basePath = mw.config.get( 'wgScriptPath' ); |
181 | | - |
182 | | - // From [[Special:JavaScriptTest]] we need to preprend the script path |
183 | | - // with the actual server (http://localhost/). |
184 | | - // Running from file tests/qunit/index.html, wgScriptPath is already |
185 | | - // including the wgServer part |
186 | | - if( server !== null ) { |
187 | | - basePath = server + basePath; |
188 | | - } |
189 | 179 | // Forge an URL to the test callback script |
190 | 180 | var target = QUnit.fixurl( |
191 | | - basePath + '/tests/qunit/data/qunitOkCall.js' |
| 181 | + mw.config.get( 'wgServer' ) + mw.config.get( 'wgScriptPath' ) + '/tests/qunit/data/qunitOkCall.js' |
192 | 182 | ); |
193 | 183 | |
194 | 184 | // Confirm that mw.loader.load() works with protocol-relative URLs |