mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-23 22:03:39 +00:00
Merge "Hygiene: revise lazyImageLoader.loadImages() API"
This commit is contained in:
commit
74a37b0412
|
@ -96,9 +96,8 @@
|
|||
// If all image downloads are taking longer to load then the MAX_PRINT_TIMEOUT
|
||||
// abort the spinner and print regardless.
|
||||
icon.timeout = setTimeout( doPrint, MAX_PRINT_TIMEOUT );
|
||||
lazyImageLoader.loadImages(
|
||||
skin.$.bind( skin ), skin.getUnloadedImages()
|
||||
).then( doPrintBeforeTimeout, doPrintBeforeTimeout );
|
||||
lazyImageLoader.loadImages( lazyImageLoader.queryPlaceholders( document.getElementById( 'content' ) ) )
|
||||
.then( doPrintBeforeTimeout, doPrintBeforeTimeout );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
spy = this.sandbox.stub( window, 'print' );
|
||||
|
||||
this.sandbox.stub( lazyImageLoader, 'loadImages' ).returns( d.resolve() );
|
||||
this.sandbox.stub( lazyImageLoader, 'queryPlaceholders' ).returns( [] );
|
||||
|
||||
handler();
|
||||
d.then( function () {
|
||||
|
@ -49,6 +50,7 @@
|
|||
spy = this.sandbox.stub( window, 'print' );
|
||||
|
||||
this.sandbox.stub( lazyImageLoader, 'loadImages' ).returns( d );
|
||||
this.sandbox.stub( lazyImageLoader, 'queryPlaceholders' ).returns( [] );
|
||||
|
||||
window.setTimeout( function () {
|
||||
d.resolve();
|
||||
|
@ -69,6 +71,7 @@
|
|||
spy = this.sandbox.stub( window, 'print' );
|
||||
|
||||
this.sandbox.stub( lazyImageLoader, 'loadImages' ).returns( d );
|
||||
this.sandbox.stub( lazyImageLoader, 'queryPlaceholders' ).returns( [] );
|
||||
|
||||
window.setTimeout( function () {
|
||||
d.resolve();
|
||||
|
|
Loading…
Reference in a new issue