// This bug was actually already fixed in 1.18 and later when discovered in 1.17.
// Test is for regressions!
- // Forge an URL to the test callback script
+ // Forge a URL to the test callback script
var target = QUnit.fixurl(
mw.config.get( 'wgServer' ) + mw.config.get( 'wgScriptPath' ) + '/tests/qunit/data/qunitOkCall.js'
);
mw.loader.load( target );
} );
+ QUnit.asyncTest( 'mw.loader( "/absolute-path" )', 2, function ( assert ) {
+ // Forge a URL to the test callback script
+ var target = QUnit.fixurl(
+ mw.config.get( 'wgScriptPath' ) + '/tests/qunit/data/qunitOkCall.js'
+ );
+
+ // Confirm that mw.loader.load() works with absolute-paths (relative to current hostname)
+ assert.equal( target.slice( 0, 1 ), '/', 'URL is relative to document root' );
+
+ // Async!
+ // The target calls QUnit.start
+ mw.loader.load( target );
+ } );
+
QUnit.asyncTest( 'mw.loader() executing race (T112232)', 2, function ( assert ) {
var done = false;