Krinkle has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/130776

Change subject: mediawiki.util.test: Suppress deprecation notice for jsMessage
......................................................................

mediawiki.util.test: Suppress deprecation notice for jsMessage

* Hide the false positive when running the QUnit test suite.
* Clean up documentation comment (tag order) for consistency
  with the rest of the code base.

Follows-up Ib41d5245682552, I211593629ca2.

Change-Id: Iac42aef26f78b5637e5aaafb6fc48e60e9ea0e3f
---
M resources/src/mediawiki/mediawiki.util.js
M tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js
2 files changed, 7 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/76/130776/1

diff --git a/resources/src/mediawiki/mediawiki.util.js 
b/resources/src/mediawiki/mediawiki.util.js
index f09d03c..5fc7371 100644
--- a/resources/src/mediawiki/mediawiki.util.js
+++ b/resources/src/mediawiki/mediawiki.util.js
@@ -465,14 +465,13 @@
        mw.log.deprecate( util, 'wikiGetlink', util.getUrl, 'Use mw.util.getUrl 
instead.' );
 
        /**
-        * @property {string} tooltipAccessKeyPrefix
         * Access key prefix. Might be wrong for browsers implementing the 
accessKeyLabel property.
+        * @property {string} tooltipAccessKeyPrefix
         * @deprecated since 1.24 Use the module jquery.accessKeyLabel instead.
         */
        mw.log.deprecate( util, 'tooltipAccessKeyPrefix', 
$.fn.updateTooltipAccessKeys.getAccessKeyPrefix(), 'Use jquery.accessKeyLabel 
instead.' );
 
        /**
-        * @property {RegExp} tooltipAccessKeyRegexp
         * Regex to match accesskey tooltips.
         *
         * Should match:
@@ -486,19 +485,20 @@
         *
         * Will probably not work for browsers implementing the accessKeyLabel 
property.
         *
+        * @property {RegExp} tooltipAccessKeyRegexp
         * @deprecated since 1.24 Use the module jquery.accessKeyLabel instead.
         */
        mw.log.deprecate( util, 'tooltipAccessKeyRegexp', 
/\[(ctrl-)?(option-)?(alt-)?(shift-)?(esc-)?(.)\]$/, 'Use jquery.accessKeyLabel 
instead.' );
 
        /**
-        * @method jsMessage
         * Add a little box at the top of the screen to inform the user of
         * something, replacing any previous message.
         * Calling with no arguments, with an empty string or null will hide 
the message
         *
-        * @param {Mixed} message The DOM-element, jQuery object or HTML-string 
to be put inside the message box.
-        * to allow CSS/JS to hide different boxes. null = no class used.
+        * @method jsMessage
         * @deprecated since 1.20 Use mw#notify
+        * @param {Mixed} message The DOM-element, jQuery object or HTML-string 
to be put inside the message box.
+        *  to allow CSS/JS to hide different boxes. null = no class used.
         */
        mw.log.deprecate( util, 'jsMessage', function ( message ) {
                if ( !arguments.length || message === '' || message === null ) {
diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js 
b/tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js
index 1e059e1..81fda7e 100644
--- a/tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js
+++ b/tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js
@@ -210,7 +210,9 @@
        } );
 
        QUnit.test( 'jsMessage', 1, function ( assert ) {
+               this.suppressWarnings();
                var a = mw.util.jsMessage( 'MediaWiki is <b>Awesome</b>.' );
+               this.restoreWarnings();
                assert.ok( a, 'Basic checking of return value' );
 
                // Clean up

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iac42aef26f78b5637e5aaafb6fc48e60e9ea0e3f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle <krinklem...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to