function isCssImportApplied() {
// Trigger reflow, repaint, redraw, whatever (cross-browser)
- var x = $element.css( 'height' );
- x = el.innerHTML;
+ $element.css( 'height' );
+ el.innerHTML;
el.className = el.className;
- x = document.documentElement.clientHeight;
+ document.documentElement.clientHeight;
return $element.css( prop ) === val;
}
);
}
- QUnit.test( 'Basic', 2, function ( assert ) {
+ QUnit.test( 'Basic', function ( assert ) {
var isAwesomeDone;
mw.loader.testCallback = function () {
} );
} );
- QUnit.test( 'Object method as module name', 2, function ( assert ) {
+ QUnit.test( 'Object method as module name', function ( assert ) {
var isAwesomeDone;
mw.loader.testCallback = function () {
} );
} );
- QUnit.test( '.using( .. ) Promise', 2, function ( assert ) {
+ QUnit.test( '.using( .. ) Promise', function ( assert ) {
var isAwesomeDone;
mw.loader.testCallback = function () {
).always( done );
} );
- QUnit.test( '.load() - Error: Unregistered (ignored)', 0, function ( assert ) {
+ QUnit.test( '.load() - Error: Unregistered (ignored)', function ( assert ) {
+ assert.expect( 0 );
mw.loader.load( 'test.using.unreg2' );
} );
- QUnit.test( '.implement( styles={ "css": [text, ..] } )', 2, function ( assert ) {
+ QUnit.test( '.implement( styles={ "css": [text, ..] } )', function ( assert ) {
var $element = $( '<div class="mw-test-implement-a"></div>' ).appendTo( '#qunit-fixture' );
assert.notEqual(
return mw.loader.using( 'test.implement.a' );
} );
- QUnit.test( '.implement( styles={ "url": { <media>: [url, ..] } } )', 7, function ( assert ) {
+ QUnit.test( '.implement( styles={ "url": { <media>: [url, ..] } } )', function ( assert ) {
var $element1 = $( '<div class="mw-test-implement-b1"></div>' ).appendTo( '#qunit-fixture' ),
$element2 = $( '<div class="mw-test-implement-b2"></div>' ).appendTo( '#qunit-fixture' ),
$element3 = $( '<div class="mw-test-implement-b3"></div>' ).appendTo( '#qunit-fixture' ),
url: {
print: [ urlStyleTest( '.mw-test-implement-b1', 'text-align', 'center' ) ],
screen: [
- // bug 40834: Make sure it actually works with more than 1 stylesheet reference
+ // T42834: Make sure it actually works with more than 1 stylesheet reference
urlStyleTest( '.mw-test-implement-b2', 'float', 'left' ),
urlStyleTest( '.mw-test-implement-b3', 'float', 'right' )
]
} );
// Backwards compatibility
- QUnit.test( '.implement( styles={ <media>: text } ) (back-compat)', 2, function ( assert ) {
+ QUnit.test( '.implement( styles={ <media>: text } ) (back-compat)', function ( assert ) {
var $element = $( '<div class="mw-test-implement-c"></div>' ).appendTo( '#qunit-fixture' );
assert.notEqual(
} );
// Backwards compatibility
- QUnit.test( '.implement( styles={ <media>: [url, ..] } ) (back-compat)', 4, function ( assert ) {
+ QUnit.test( '.implement( styles={ <media>: [url, ..] } ) (back-compat)', function ( assert ) {
var $element = $( '<div class="mw-test-implement-d"></div>' ).appendTo( '#qunit-fixture' ),
$element2 = $( '<div class="mw-test-implement-d2"></div>' ).appendTo( '#qunit-fixture' ),
done = assert.async();
'test.implement.d',
function () {
assertStyleAsync( assert, $element, 'float', 'right', function () {
- assert.notEqual( $element2.css( 'text-align' ), 'center', 'print style is not applied (bug 40500)' );
+ assert.notEqual( $element2.css( 'text-align' ), 'center', 'print style is not applied (T42500)' );
done();
} );
},
mw.loader.load( 'test.implement.d' );
} );
- // @import (bug 31676)
- QUnit.test( '.implement( styles has @import )', 7, function ( assert ) {
+ // @import (T33676)
+ QUnit.test( '.implement( styles has @import )', function ( assert ) {
var isJsExecuted, $element,
done = assert.async();
} );
} );
- QUnit.test( '.implement( dependency with styles )', 4, function ( assert ) {
+ QUnit.test( '.implement( dependency with styles )', function ( assert ) {
var $element = $( '<div class="mw-test-implement-e"></div>' ).appendTo( '#qunit-fixture' ),
$element2 = $( '<div class="mw-test-implement-e2"></div>' ).appendTo( '#qunit-fixture' );
return mw.loader.using( 'test.implement.e' );
} );
- QUnit.test( '.implement( only scripts )', 1, function ( assert ) {
+ QUnit.test( '.implement( only scripts )', function ( assert ) {
mw.loader.implement( 'test.onlyscripts', function () {} );
assert.strictEqual( mw.loader.getState( 'test.onlyscripts' ), 'ready' );
} );
- QUnit.test( '.implement( only messages )', 2, function ( assert ) {
- assert.assertFalse( mw.messages.exists( 'bug_29107' ), 'Verify that the test message doesn\'t exist yet' );
+ QUnit.test( '.implement( only messages )', function ( assert ) {
+ assert.assertFalse( mw.messages.exists( 'T31107' ), 'Verify that the test message doesn\'t exist yet' );
- // jscs: disable requireCamelCaseOrUpperCaseIdentifiers
- mw.loader.implement( 'test.implement.msgs', [], {}, { bug_29107: 'loaded' } );
- // jscs: enable requireCamelCaseOrUpperCaseIdentifiers
+ mw.loader.implement( 'test.implement.msgs', [], {}, { T31107: 'loaded' } );
return mw.loader.using( 'test.implement.msgs', function () {
- assert.ok( mw.messages.exists( 'bug_29107' ), 'Bug 29107: messages-only module should implement ok' );
+ assert.ok( mw.messages.exists( 'T31107' ), 'T31107: messages-only module should implement ok' );
}, function () {
assert.ok( false, 'Error callback fired while implementing "test.implement.msgs" module' );
} );
} );
- QUnit.test( '.implement( empty )', 1, function ( assert ) {
+ QUnit.test( '.implement( empty )', function ( assert ) {
mw.loader.implement( 'test.empty' );
assert.strictEqual( mw.loader.getState( 'test.empty' ), 'ready' );
} );
- QUnit.test( 'Broken indirect dependency', 4, function ( assert ) {
+ QUnit.test( 'Broken indirect dependency', function ( assert ) {
// don't emit an error event
this.sandbox.stub( mw, 'track' );
assert.strictEqual( mw.track.callCount, 1 );
} );
- QUnit.test( 'Out-of-order implementation', 9, function ( assert ) {
+ QUnit.test( 'Out-of-order implementation', function ( assert ) {
mw.loader.register( [
[ 'test.module4', '0' ],
[ 'test.module5', '0', [ 'test.module4' ] ],
assert.strictEqual( mw.loader.getState( 'test.module6' ), 'ready', 'Expected "ready" state for test.module6' );
} );
- QUnit.test( 'Missing dependency', 13, function ( assert ) {
+ QUnit.test( 'Missing dependency', function ( assert ) {
mw.loader.register( [
[ 'test.module7', '0' ],
[ 'test.module8', '0', [ 'test.module7' ] ],
);
} );
- QUnit.test( 'Dependency handling', 5, function ( assert ) {
+ QUnit.test( 'Dependency handling', function ( assert ) {
var done = assert.async();
mw.loader.register( [
// [module, version, dependencies, group, source]
);
} );
- QUnit.test( 'Skip-function handling', 5, function ( assert ) {
+ QUnit.test( 'Skip-function handling', function ( assert ) {
mw.loader.register( [
// [module, version, dependencies, group, source, skip]
[ 'testSkipped', '1', [], null, 'testloader', 'return true;' ],
);
} );
- QUnit.asyncTest( '.load( "//protocol-relative" ) - T32825', 2, function ( assert ) {
+ QUnit.asyncTest( '.load( "//protocol-relative" ) - T32825', function ( assert ) {
// This bug was actually already fixed in 1.18 and later when discovered in 1.17.
// Test is for regressions!
mw.loader.load( target );
} );
- QUnit.asyncTest( '.load( "/absolute-path" )', 2, function ( assert ) {
+ QUnit.asyncTest( '.load( "/absolute-path" )', function ( assert ) {
// Forge a URL to the test callback script
var target = QUnit.fixurl(
mw.config.get( 'wgScriptPath' ) + '/tests/qunit/data/qunitOkCall.js'
} );
} );
- QUnit.test( 'Executing race - T112232', 2, function ( assert ) {
+ QUnit.test( 'Executing race - T112232', function ( assert ) {
var done = false;
// The red herring schedules its CSS buffer first. In T112232, a bug in the
} );
} );
- QUnit.test( 'require()', 6, function ( assert ) {
+ QUnit.test( 'require()', function ( assert ) {
mw.loader.register( [
[ 'test.require1', '0' ],
[ 'test.require2', '0' ],