mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-12-21 04:12:52 +00:00
1ded292f83
Bug: T208951 Change-Id: Ice695dfb489974faa23ba19d74cf17b06e3f6075
18 lines
555 B
JavaScript
18 lines
555 B
JavaScript
( function () {
|
|
QUnit.module( 'mmv.logging.DimensionLogger', QUnit.newMwEnvironment() );
|
|
|
|
QUnit.test( 'log()', function ( assert ) {
|
|
var fakeEventLog = { logEvent: this.sandbox.stub() },
|
|
logger = new mw.mmv.logging.DimensionLogger();
|
|
|
|
this.sandbox.stub( logger, 'loadDependencies' ).returns( $.Deferred().resolve() );
|
|
this.sandbox.stub( mw, 'log' );
|
|
|
|
logger.samplingFactor = 1;
|
|
logger.setEventLog( fakeEventLog );
|
|
|
|
logger.logDimensions( 640, 480, 200, 'resize' );
|
|
assert.ok( true, 'logDimensions() did not throw errors' );
|
|
} );
|
|
}() );
|