jenkins-bot has submitted this change and it was merged.

Change subject: Move logging-related code to its own directory
......................................................................


Move logging-related code to its own directory

Also make sure class and file names have the same case.

Change-Id: I21042e40030051326f8c55fd62a86a54e9011a4a
---
M MultimediaViewer.php
M MultimediaViewerHooks.php
M docs/categories.json
R resources/mmv/logging/mmv.logging.ActionLogger.js
R resources/mmv/logging/mmv.logging.Api.js
R resources/mmv/logging/mmv.logging.DurationLogger.js
R resources/mmv/logging/mmv.logging.Logger.js
R resources/mmv/logging/mmv.logging.Performance.js
M resources/mmv/mmv.head.js
M resources/mmv/mmv.js
M resources/mmv/provider/mmv.provider.Image.js
R tests/qunit/mmv/logging/mmv.logging.ActionLogger.test.js
R tests/qunit/mmv/logging/mmv.logging.DurationLogger.test.js
R tests/qunit/mmv/logging/mmv.logging.Performance.test.js
14 files changed, 80 insertions(+), 77 deletions(-)

Approvals:
  Gilles: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/MultimediaViewer.php b/MultimediaViewer.php
index 52fba3b..e0fbfad 100644
--- a/MultimediaViewer.php
+++ b/MultimediaViewer.php
@@ -113,7 +113,7 @@
 
                'dependencies' => array(
                        'mmv.base',
-                       'mmv.ActionLogger',
+                       'mmv.logging.ActionLogger',
                        'mmv.ui',
                        'mmv.ui.canvas',
                        'mmv.ui.canvasButtons',
@@ -288,7 +288,7 @@
                        'mmv.model.Repo',
                        'mmv.model.Thumbnail',
                        'mmv.model.User',
-                       'mmv.performance',
+                       'mmv.logging.Performance',
                        'oojs',
                ),
        ),
@@ -444,7 +444,7 @@
                'dependencies' => array(
                        'jquery.color',
                        'mediawiki.jqueryMsg',
-                       'mmv.ActionLogger',
+                       'mmv.logging.ActionLogger',
                        'mmv.ui',
                        'mmv.HtmlUtils',
                        'oojs',
@@ -496,7 +496,7 @@
                'dependencies' => array(
                        'mediawiki.user',
                        'mmv.HtmlUtils',
-                       'mmv.ActionLogger',
+                       'mmv.logging.ActionLogger',
                        'mmv.ui',
                        'mmv.ui.progressBar',
                        'mmv.ui.stripeButtons',
@@ -750,9 +750,9 @@
                ),
        ),
 
-       'mmv.logger' => $wgMediaViewerResourceTemplate + array(
+       'mmv.logging.Logger' => $wgMediaViewerResourceTemplate + array(
                'scripts' => array(
-                       'mmv/mmv.Logger.js',
+                       'mmv/logging/mmv.logging.Logger.js',
                ),
 
                'dependencies' => array(
@@ -760,26 +760,27 @@
                ),
        ),
 
-       'mmv.performance' => $wgMediaViewerResourceTemplate + array(
+       'mmv.logging.Performance' => $wgMediaViewerResourceTemplate + array(
                'scripts' => array(
-                       'mmv/mmv.performance.js',
+                       'mmv/logging/mmv.logging.Performance.js',
                ),
 
                'dependencies' => array(
                        'mmv.base',
-                       'mmv.logger',
+                       'mmv.logging.Logger',
                        'oojs',
                ),
        ),
 
-       'mmv.api' => $wgMediaViewerResourceTemplate + array(
+       'mmv.logging.Api' => $wgMediaViewerResourceTemplate + array(
                'scripts' => array(
-                       'mmv/mmv.api.js',
+                       'mmv/logging/mmv.logging.Api.js',
                ),
 
                'dependencies' => array(
                        'mediawiki.api',
                        'mmv.base',
+                       'mmv.logging.Logger',
                        'oojs',
                ),
        ),
@@ -806,15 +807,15 @@
                ),
 
                'dependencies' => array(
-                       'mmv.api',
+                       'mmv.logging.Api',
                        'mmv.base',
                        'mmv.lightboximage',
-                       'mmv.ActionLogger',
+                       'mmv.logging.ActionLogger',
                        'mmv.model.TaskQueue',
                        'mmv.lightboxinterface',
                        'mmv.provider',
                        'mmv.routing',
-                       'mmv.DurationLogger',
+                       'mmv.logging.DurationLogger',
                        'jquery.fullscreen',
                        'jquery.hidpi',
                        'jquery.scrollTo',
@@ -844,9 +845,9 @@
                        'jquery.hashchange',
                        'mediawiki.Title',
                        'mmv.Config',
-                       'mmv.ActionLogger',
+                       'mmv.logging.ActionLogger',
                        'mmv.HtmlUtils',
-                       'mmv.DurationLogger',
+                       'mmv.logging.DurationLogger',
                        'jquery.scrollTo',
                ),
 
@@ -866,26 +867,26 @@
                ),
        ),
 
-       'mmv.ActionLogger' => $wgMediaViewerResourceTemplate + array(
+       'mmv.logging.ActionLogger' => $wgMediaViewerResourceTemplate + array(
                'scripts' => array(
-                       'mmv/mmv.ActionLogger.js',
+                       'mmv/logging/mmv.logging.ActionLogger.js',
                ),
 
                'dependencies' => array(
                        'mmv.base',
-                       'mmv.logger',
+                       'mmv.logging.Logger',
                        'oojs'
                )
        ),
 
-       'mmv.DurationLogger' => $wgMediaViewerResourceTemplate + array(
+       'mmv.logging.DurationLogger' => $wgMediaViewerResourceTemplate + array(
                'scripts' => array(
-                       'mmv/mmv.DurationLogger.js',
+                       'mmv/logging/mmv.logging.DurationLogger.js',
                ),
 
                'dependencies' => array(
                        'mmv.base',
-                       'mmv.logger',
+                       'mmv.logging.Logger',
                        'oojs',
                        'mediawiki.user',
                )
@@ -925,9 +926,9 @@
                $wgEventLoggingSchemas[ 'MultimediaViewerNetworkPerformance' ] 
= 7917896;
                $wgEventLoggingSchemas[ 'MultimediaViewerDuration' ] = 8572641;
 
-               $wgResourceModules['mmv.ActionLogger']['dependencies'][] = 
'ext.eventLogging';
-               $wgResourceModules['mmv.performance']['dependencies'][] = 
'ext.eventLogging';
-               $wgResourceModules['mmv.DurationLogger']['dependencies'][] = 
'ext.eventLogging';
+               
$wgResourceModules['mmv.logging.ActionLogger']['dependencies'][] = 
'ext.eventLogging';
+               $wgResourceModules['mmv.logging.Performance']['dependencies'][] 
= 'ext.eventLogging';
+               
$wgResourceModules['mmv.logging.DurationLogger']['dependencies'][] = 
'ext.eventLogging';
        }
 };
 
diff --git a/MultimediaViewerHooks.php b/MultimediaViewerHooks.php
index 9d40dee..399044d 100644
--- a/MultimediaViewerHooks.php
+++ b/MultimediaViewerHooks.php
@@ -183,15 +183,15 @@
                        'scripts' => array(
                                'tests/qunit/mmv/mmv.bootstrap.test.js',
                                'tests/qunit/mmv/mmv.test.js',
-                               'tests/qunit/mmv/mmv.DurationLogger.test.js',
                                'tests/qunit/mmv/mmv.lightboxinterface.test.js',
                                'tests/qunit/mmv/mmv.lightboximage.test.js',
                                
'tests/qunit/mmv/mmv.ThumbnailWidthCalculator.test.js',
                                
'tests/qunit/mmv/mmv.EmbedFileFormatter.test.js',
                                'tests/qunit/mmv/mmv.Config.test.js',
                                'tests/qunit/mmv/mmv.HtmlUtils.test.js',
-                               'tests/qunit/mmv/mmv.performance.test.js',
-                               'tests/qunit/mmv/mmv.ActionLogger.test.js',
+                               
'tests/qunit/mmv/logging/mmv.logging.DurationLogger.test.js',
+                               
'tests/qunit/mmv/logging/mmv.logging.Performance.test.js',
+                               
'tests/qunit/mmv/logging/mmv.logging.ActionLogger.test.js',
                                'tests/qunit/mmv/model/mmv.model.test.js',
                                
'tests/qunit/mmv/model/mmv.model.IwTitle.test.js',
                                
'tests/qunit/mmv/model/mmv.model.TaskQueue.test.js',
diff --git a/docs/categories.json b/docs/categories.json
index fdf5227..bbc3dc7 100644
--- a/docs/categories.json
+++ b/docs/categories.json
@@ -5,22 +5,23 @@
                        {
                                "name": "Base",
                                "classes": [
-                                       "mw.mmv.Api",
-                                       "mw.mmv.ActionLogger",
                                        "mw.mmv.Config",
-                                       "mw.mmv.DurationLogger",
                                        "mw.mmv.EmbedFileFormatter",
                                        "mw.mmv.HtmlUtils",
                                        "mw.mmv.LightboxImage",
                                        "mw.mmv.LightboxInterface",
-                                       "mw.mmv.Logger",
                                        "mw.mmv.MultimediaViewer",
                                        "mw.mmv.MultimediaViewerBootstrap",
-                                       "mw.mmv.Performance",
                                        "mw.mmv.ThumbnailWidthCalculator"
                                ]
                        },
                        {
+                               "name": "Loggers",
+                               "classes": [
+                                       "mw.mmv.logging.*"
+                               ]
+                       },
+                       {
                                "name": "Models",
                                "classes": [
                                        "mw.mmv.model.*"
diff --git a/resources/mmv/mmv.ActionLogger.js 
b/resources/mmv/logging/mmv.logging.ActionLogger.js
similarity index 95%
rename from resources/mmv/mmv.ActionLogger.js
rename to resources/mmv/logging/mmv.logging.ActionLogger.js
index 7753fcc..afe4336 100644
--- a/resources/mmv/mmv.ActionLogger.js
+++ b/resources/mmv/logging/mmv.logging.ActionLogger.js
@@ -20,13 +20,13 @@
 
        /**
         * Writes log entries
-        * @class mw.mmv.ActionLogger
-        * @extends mw.mmv.Logger
+        * @class mw.mmv.logging.ActionLogger
+        * @extends mw.mmv.logging.Logger
         * @constructor
         */
        function ActionLogger() {}
 
-       oo.inheritClass( ActionLogger, mw.mmv.Logger );
+       oo.inheritClass( ActionLogger, mw.mmv.logging.Logger );
 
        L = ActionLogger.prototype;
 
@@ -138,6 +138,6 @@
                return Math.floor( Math.random() * factor ) === 0;
        };
 
-       mw.mmv.ActionLogger = ActionLogger;
-       mw.mmv.actionLogger = new mw.mmv.ActionLogger();
+       mw.mmv.logging.ActionLogger = ActionLogger;
+       mw.mmv.actionLogger = new ActionLogger();
 }( mediaWiki, jQuery, OO ) );
diff --git a/resources/mmv/mmv.api.js b/resources/mmv/logging/mmv.logging.Api.js
similarity index 85%
rename from resources/mmv/mmv.api.js
rename to resources/mmv/logging/mmv.logging.Api.js
index 6cdff0a..aa92f36 100644
--- a/resources/mmv/mmv.api.js
+++ b/resources/mmv/logging/mmv.logging.Api.js
@@ -17,8 +17,8 @@
 
 ( function ( mw, $, oo ) {
        /**
-        * Runs performance analysis on requests via mw.mmv.Performance
-        * @class mw.mmv.Api
+        * Runs performance analysis on requests via mw.mmv.logging.Performance
+        * @class mw.mmv.logging.Api
         * @extends mw.Api
         * @constructor
         * @param {string} type The type of the requests to be made through 
this API.
@@ -27,8 +27,8 @@
        function Api( type, options ) {
                mw.Api.call( this, options );
 
-               /** @property {mw.mmv.Performance} performance Used to record 
performance data. */
-               this.performance = new mw.mmv.Performance();
+               /** @property {mw.mmv.logging.Performance} performance Used to 
record performance data. */
+               this.performance = new mw.mmv.logging.Performance();
 
                /** @property {string} type Type of requests being sent via 
this API. */
                this.type = type;
@@ -52,5 +52,5 @@
                } );
        };
 
-       mw.mmv.Api = Api;
+       mw.mmv.logging.Api = Api;
 }( mediaWiki, jQuery, OO ) );
diff --git a/resources/mmv/mmv.DurationLogger.js 
b/resources/mmv/logging/mmv.logging.DurationLogger.js
similarity index 94%
rename from resources/mmv/mmv.DurationLogger.js
rename to resources/mmv/logging/mmv.logging.DurationLogger.js
index d3dcc14..1a769d7 100644
--- a/resources/mmv/mmv.DurationLogger.js
+++ b/resources/mmv/logging/mmv.logging.DurationLogger.js
@@ -20,15 +20,15 @@
 
        /**
         * Writes EventLogging entries for duration measurements
-        * @class mw.mmv.DurationLogger
-        * @extends mw.mmv.Logger
+        * @class mw.mmv.logging.DurationLogger
+        * @extends mw.mmv.logging.Logger
         * @constructor
         */
        function DurationLogger() {
                this.starts = {};
        }
 
-       oo.inheritClass( DurationLogger, mw.mmv.Logger );
+       oo.inheritClass( DurationLogger, mw.mmv.logging.Logger );
 
        L = DurationLogger.prototype;
 
diff --git a/resources/mmv/mmv.Logger.js 
b/resources/mmv/logging/mmv.logging.Logger.js
similarity index 96%
rename from resources/mmv/mmv.Logger.js
rename to resources/mmv/logging/mmv.logging.Logger.js
index d1ca3ae..4663e27 100644
--- a/resources/mmv/mmv.Logger.js
+++ b/resources/mmv/logging/mmv.logging.Logger.js
@@ -20,7 +20,7 @@
 
        /**
         * Abstract class providing common code for EventLogging loggers
-        * @class mw.mmv.Logger
+        * @class mw.mmv.logging.Logger
         * @abstract
         */
        function Logger() {
@@ -124,5 +124,6 @@
                }
        };
 
-       mw.mmv.Logger = Logger;
+       mw.mmv.logging = {};
+       mw.mmv.logging.Logger = Logger;
 }( mediaWiki, jQuery ) );
diff --git a/resources/mmv/mmv.performance.js 
b/resources/mmv/logging/mmv.logging.Performance.js
similarity index 98%
rename from resources/mmv/mmv.performance.js
rename to resources/mmv/logging/mmv.logging.Performance.js
index c35abad..677fa0f 100644
--- a/resources/mmv/mmv.performance.js
+++ b/resources/mmv/logging/mmv.logging.Performance.js
@@ -21,13 +21,13 @@
        /**
         * Measures the network performance
         * See 
<https://meta.wikimedia.org/wiki/Schema:MultimediaViewerNetworkPerformance>
-        * @class mw.mmv.Performance
-        * @extends mw.mmv.Logger
+        * @class mw.mmv.logging.Performance
+        * @extends mw.mmv.logging.Logger
         * @constructor
         */
        function Performance() {}
 
-       oo.inheritClass( Performance, mw.mmv.Logger );
+       oo.inheritClass( Performance, mw.mmv.logging.Logger );
 
        P = Performance.prototype;
 
@@ -404,6 +404,6 @@
 
        new Performance().init();
 
-       mw.mmv.Performance = Performance;
+       mw.mmv.logging.Performance = Performance;
 
 }( mediaWiki, jQuery, OO ) );
diff --git a/resources/mmv/mmv.head.js b/resources/mmv/mmv.head.js
index 48e804c..43a8b63 100644
--- a/resources/mmv/mmv.head.js
+++ b/resources/mmv/mmv.head.js
@@ -44,7 +44,7 @@
                // We wait for document readiness because mw.loader.using 
writes to the DOM
                // which can cause a blank page if it happens before DOM 
readiness
                $document.ready( function () {
-                       mw.loader.using( [ 'mmv.bootstrap.autostart', 
'mmv.DurationLogger' ] , function() {
+                       mw.loader.using( [ 'mmv.bootstrap.autostart', 
'mmv.logging.DurationLogger' ] , function() {
                                mw.mmv.bootstrap.whenThumbsReady().then( 
function () {
                                        mw.mmv.durationLogger.stop( 
'early-click-to-replay-click', start );
 
diff --git a/resources/mmv/mmv.js b/resources/mmv/mmv.js
index 4b47378..a7e2bd2 100644
--- a/resources/mmv/mmv.js
+++ b/resources/mmv/mmv.js
@@ -38,7 +38,7 @@
                 * @property {mw.mmv.provider.ImageInfo}
                 * @private
                 */
-               this.imageInfoProvider = new mw.mmv.provider.ImageInfo( new 
mw.mmv.Api( 'imageinfo' ),
+               this.imageInfoProvider = new mw.mmv.provider.ImageInfo( new 
mw.mmv.logging.Api( 'imageinfo' ),
                        // Short-circuit, don't fallback, to save some tiny 
amount of time
                        { language: mw.config.get( 'wgUserLanguage', false ) || 
mw.config.get( 'wgContentLanguage', 'en' ) }
                );
@@ -47,14 +47,14 @@
                 * @property {mw.mmv.provider.FileRepoInfo}
                 * @private
                 */
-               this.fileRepoInfoProvider = new mw.mmv.provider.FileRepoInfo( 
new mw.mmv.Api( 'filerepoinfo' ),
+               this.fileRepoInfoProvider = new mw.mmv.provider.FileRepoInfo( 
new mw.mmv.logging.Api( 'filerepoinfo' ),
                        { maxage: apiCacheMaxAge } );
 
                /**
                 * @property {mw.mmv.provider.ThumbnailInfo}
                 * @private
                 */
-               this.thumbnailInfoProvider = new mw.mmv.provider.ThumbnailInfo( 
new mw.mmv.Api( 'thumbnailinfo' ),
+               this.thumbnailInfoProvider = new mw.mmv.provider.ThumbnailInfo( 
new mw.mmv.logging.Api( 'thumbnailinfo' ),
                        { maxage: apiCacheMaxAge } );
 
                /**
@@ -67,7 +67,7 @@
                 * @property {mw.mmv.provider.UserInfo}
                 * @private
                 */
-               this.userInfoProvider = new mw.mmv.provider.UserInfo( new 
mw.mmv.Api( 'userinfo' ), {
+               this.userInfoProvider = new mw.mmv.provider.UserInfo( new 
mw.mmv.logging.Api( 'userinfo' ), {
                        useApi: this.needGender(),
                        maxage: apiCacheMaxAge
                } );
@@ -76,21 +76,21 @@
                 * @property {mw.mmv.provider.ImageUsage}
                 * @private
                 */
-               this.imageUsageProvider = new mw.mmv.provider.ImageUsage( new 
mw.mmv.Api( 'imageusage' ),
+               this.imageUsageProvider = new mw.mmv.provider.ImageUsage( new 
mw.mmv.logging.Api( 'imageusage' ),
                        { maxage: apiCacheMaxAge } );
 
                /**
                 * @property {mw.mmv.provider.GlobalUsage}
                 * @private
                 */
-               this.globalUsageProvider = new mw.mmv.provider.GlobalUsage( new 
mw.mmv.Api( 'globalusage' ), {
+               this.globalUsageProvider = new mw.mmv.provider.GlobalUsage( new 
mw.mmv.logging.Api( 'globalusage' ), {
                        useApi: mw.config.get( 'wgMultimediaViewer' 
).globalUsageAvailable,
                        maxage: apiCacheMaxAge
                } );
                // replace with this one to test global usage on a local wiki 
without going through all the
                // hassle required for installing the extension:
                //this.globalUsageProvider = new mw.mmv.provider.GlobalUsage(
-               //      new mw.mmv.Api( 'globalusage', { ajax: { url: 
'http://commons.wikimedia.org/w/api.php', dataType: 'jsonp' } } )
+               //      new mw.mmv.logging.Api( 'globalusage', { ajax: { url: 
'http://commons.wikimedia.org/w/api.php', dataType: 'jsonp' } } )
                //);
 
                /**
diff --git a/resources/mmv/provider/mmv.provider.Image.js 
b/resources/mmv/provider/mmv.provider.Image.js
index c6becc5..e2e1b2b 100644
--- a/resources/mmv/provider/mmv.provider.Image.js
+++ b/resources/mmv/provider/mmv.provider.Image.js
@@ -23,10 +23,10 @@
         */
        function Image() {
                /**
-                * @property {mw.mmv.Performance}
+                * @property {mw.mmv.logging.Performance}
                 * @private
                 */
-               this.performance = new mw.mmv.Performance();
+               this.performance = new mw.mmv.logging.Performance();
 
                /**
                 * AJAX call cache.
@@ -37,7 +37,7 @@
        }
 
        /**
-        * Loads an image and returns it. Includes performance metrics via 
mw.mmv.Performance.
+        * Loads an image and returns it. Includes performance metrics via 
mw.mmv.logging.Performance.
         * When the browser supports it, the image is loaded as an AJAX request.
         * @param {string} url
         * @return {jQuery.Promise.<HTMLImageElement>} A promise which resolves 
to the image object.
diff --git a/tests/qunit/mmv/mmv.ActionLogger.test.js 
b/tests/qunit/mmv/logging/mmv.logging.ActionLogger.test.js
similarity index 92%
rename from tests/qunit/mmv/mmv.ActionLogger.test.js
rename to tests/qunit/mmv/logging/mmv.logging.ActionLogger.test.js
index f46cd0d..783dddf 100644
--- a/tests/qunit/mmv/mmv.ActionLogger.test.js
+++ b/tests/qunit/mmv/logging/mmv.logging.ActionLogger.test.js
@@ -1,9 +1,9 @@
 ( function ( mw, $ ) {
-       QUnit.module( 'mmv.ActionLogger', QUnit.newMwEnvironment() );
+       QUnit.module( 'mmv.logging.ActionLogger', QUnit.newMwEnvironment() );
 
        QUnit.test( 'log()', 8, function ( assert ) {
                var fakeEventLog = { logEvent : this.sandbox.stub() },
-                       logger = new mw.mmv.ActionLogger(),
+                       logger = new mw.mmv.logging.ActionLogger(),
                        action1key = 'test-1',
                        action1value = 'Test',
                        action2key = 'test-2',
diff --git a/tests/qunit/mmv/mmv.DurationLogger.test.js 
b/tests/qunit/mmv/logging/mmv.logging.DurationLogger.test.js
similarity index 98%
rename from tests/qunit/mmv/mmv.DurationLogger.test.js
rename to tests/qunit/mmv/logging/mmv.logging.DurationLogger.test.js
index 69f702b..ef88131 100644
--- a/tests/qunit/mmv/mmv.DurationLogger.test.js
+++ b/tests/qunit/mmv/logging/mmv.logging.DurationLogger.test.js
@@ -1,5 +1,5 @@
 ( function ( mw, $ ) {
-       QUnit.module( 'mmv.DurationLogger', QUnit.newMwEnvironment({
+       QUnit.module( 'mmv.logging.DurationLogger', QUnit.newMwEnvironment({
                setup: function () {
                        this.clock = this.sandbox.useFakeTimers();
                }
diff --git a/tests/qunit/mmv/mmv.performance.test.js 
b/tests/qunit/mmv/logging/mmv.logging.Performance.test.js
similarity index 93%
rename from tests/qunit/mmv/mmv.performance.test.js
rename to tests/qunit/mmv/logging/mmv.logging.Performance.test.js
index 4a7cf81..fbcfee8 100644
--- a/tests/qunit/mmv/mmv.performance.test.js
+++ b/tests/qunit/mmv/logging/mmv.logging.Performance.test.js
@@ -16,7 +16,7 @@
  */
 
 ( function ( mw, $ ) {
-       QUnit.module( 'mmv.performance', QUnit.newMwEnvironment() );
+       QUnit.module( 'mmv.logging.Performance', QUnit.newMwEnvironment() );
 
        function createFakeXHR( response )  {
                return {
@@ -37,7 +37,7 @@
        }
 
        QUnit.test( 'recordEntry: basic', 7, function ( assert ) {
-               var performance = new mw.mmv.Performance(),
+               var performance = new mw.mmv.logging.Performance(),
                        fakeEventLog = { logEvent : this.sandbox.stub() },
                        type = 'gender',
                        total = 100;
@@ -110,7 +110,7 @@
                        },
                        country = 'FR',
                        type = 'image',
-                       performance = new mw.mmv.Performance(),
+                       performance = new mw.mmv.logging.Performance(),
                        status = 200,
                        metered = true,
                        bandwidth = 45.67,
@@ -190,7 +190,7 @@
                        varnish2 = 'cp3006',
                        varnish3 = 'cp3005',
                        testString = varnish1 + ' miss (0), ' + varnish2  + ' 
miss (0), ' + varnish3 + ' frontend hit (1)',
-                       performance = new mw.mmv.Performance(),
+                       performance = new mw.mmv.logging.Performance(),
                        varnishXCache = performance.parseVarnishXCacheHeader( 
testString );
 
                assert.strictEqual( varnishXCache.varnish1, varnish1, 'First 
varnish server name extracted' );
@@ -220,7 +220,7 @@
                var type = 'foo',
                        url = 'http://example.com/',
                        response = {},
-                       performance = new mw.mmv.Performance();
+                       performance = new mw.mmv.logging.Performance();
 
                performance.newXHR = function () { return createFakeXHR( 
response ); };
 
@@ -242,7 +242,7 @@
        QUnit.asyncTest( 'record() with old browser', 1, function ( assert ) {
                var type = 'foo',
                        url = 'http://example.com/',
-                       performance = new mw.mmv.Performance();
+                       performance = new mw.mmv.logging.Performance();
 
                performance.newXHR = function () { throw 'XMLHttpRequest? 
What\'s that?'; };
 
@@ -252,9 +252,9 @@
                } );
        } );
 
-       QUnit.test( 'mw.mmv.Api', 3, function ( assert ) {
+       QUnit.test( 'mw.mmv.logging.Api', 3, function ( assert ) {
                var api,
-                       oldRecord = 
mw.mmv.Performance.prototype.recordJQueryEntryDelayed,
+                       oldRecord = 
mw.mmv.logging.Performance.prototype.recordJQueryEntryDelayed,
                        oldAjax = mw.Api.prototype.ajax,
                        ajaxCalled = false,
                        fakeJqxhr = {};
@@ -264,18 +264,18 @@
                        return $.Deferred().resolve( {}, fakeJqxhr );
                };
 
-               mw.mmv.Performance.prototype.recordJQueryEntryDelayed = 
function ( type, total, jqxhr ) {
+               mw.mmv.logging.Performance.prototype.recordJQueryEntryDelayed = 
function ( type, total, jqxhr ) {
                        assert.strictEqual( type, 'foo', 'type was passed 
correctly' );
                        assert.strictEqual( jqxhr, fakeJqxhr, 'jqXHR was passed 
correctly' );
                };
 
-               api = new mw.mmv.Api( 'foo' );
+               api = new mw.mmv.logging.Api( 'foo' );
 
                api.ajax();
 
                assert.ok( ajaxCalled, 'parent ajax() function was called' );
 
-               mw.mmv.Performance.prototype.recordJQueryEntryDelayed = 
oldRecord;
+               mw.mmv.logging.Performance.prototype.recordJQueryEntryDelayed = 
oldRecord;
                mw.Api.prototype.ajax = oldAjax;
        } );
 }( mediaWiki, jQuery ) );

-- 
To view, visit https://gerrit.wikimedia.org/r/158543
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I21042e40030051326f8c55fd62a86a54e9011a4a
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: GergÅ‘ Tisza <[email protected]>
Gerrit-Reviewer: Gilles <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to