2013-12-09 20:18:40 +00:00
|
|
|
( function ( /** mw, $ ** Commentted to keep lint happy, uncomment when needed */) {
|
2013-12-11 02:08:07 +00:00
|
|
|
QUnit.module( 'ext.multimediaViewer.multilightbox.lightboxImage', QUnit.newMwEnvironment() );
|
2013-12-09 20:18:40 +00:00
|
|
|
|
|
|
|
QUnit.asyncTest( 'Sanity test, object creation and image loading', 1, function ( assert ) {
|
|
|
|
var lightboxImage = new window.LightboxImage( 'http://en.wikipedia.org/w/skins/vector/images/search-ltr.png' );
|
|
|
|
|
|
|
|
// Function to be called if loading is successful
|
|
|
|
function loadCallback() {
|
|
|
|
assert.ok( true, 'Image loaded !' );
|
|
|
|
QUnit.start();
|
|
|
|
}
|
|
|
|
|
|
|
|
lightboxImage.getImageElement( loadCallback );
|
|
|
|
} );
|
|
|
|
|
|
|
|
}( mediaWiki, jQuery ) );
|