var scriptPath = pathParts.join( '/' );
mw.config.set({
+ "wgServer": location.protocol + '//' + location.host,
"wgScriptPath": scriptPath,
"wgLoadScript": scriptPath + '/load.php',
"stylepath": scriptPath + '/skins',
expect(2);
- var server = mw.config.get( 'wgServer' ),
- basePath = mw.config.get( 'wgScriptPath' );
-
- // From [[Special:JavaScriptTest]] we need to preprend the script path
- // with the actual server (http://localhost/).
- // Running from file tests/qunit/index.html, wgScriptPath is already
- // including the wgServer part
- if( server !== null ) {
- basePath = server + basePath;
- }
// Forge an URL to the test callback script
var target = QUnit.fixurl(
- basePath + '/tests/qunit/data/qunitOkCall.js'
+ mw.config.get( 'wgServer' ) + mw.config.get( 'wgScriptPath' ) + '/tests/qunit/data/qunitOkCall.js'
);
// Confirm that mw.loader.load() works with protocol-relative URLs