2014-01-30 07:22:26 +00:00
|
|
|
( function ( mw, $ ) {
|
|
|
|
var MTH = {};
|
|
|
|
|
2014-04-14 18:32:30 +00:00
|
|
|
MTH.enterFullscreenMock = function () {
|
2014-01-30 07:22:26 +00:00
|
|
|
this.first().addClass( 'jq-fullscreened' ).data( 'isFullscreened', true );
|
2014-04-14 18:32:30 +00:00
|
|
|
|
2014-01-30 07:22:26 +00:00
|
|
|
$( document ).trigger( $.Event( 'jq-fullscreen-change', { element: this, fullscreen: true } ) );
|
|
|
|
};
|
|
|
|
|
2014-04-14 18:32:30 +00:00
|
|
|
MTH.exitFullscreenMock = function () {
|
2014-01-30 07:22:26 +00:00
|
|
|
this.first().removeClass( 'jq-fullscreened' ).data( 'isFullscreened', false );
|
|
|
|
|
|
|
|
$( document ).trigger( $.Event( 'jq-fullscreen-change', { element: this, fullscreen: false } ) );
|
|
|
|
};
|
|
|
|
|
2014-04-14 18:32:30 +00:00
|
|
|
MTH.getException = function ( callback ) {
|
|
|
|
var ex;
|
|
|
|
try {
|
|
|
|
callback();
|
|
|
|
} catch ( e ) {
|
|
|
|
ex = e;
|
|
|
|
}
|
|
|
|
return ex;
|
|
|
|
};
|
|
|
|
|
2014-02-25 02:28:49 +00:00
|
|
|
mw.mmv.testHelpers = MTH;
|
2014-01-30 07:22:26 +00:00
|
|
|
} )( mediaWiki, jQuery );
|