r75326 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75325‎ | r75326 | r75327 >
Date:17:52, 24 October 2010
Author:krinkle
Status:ok
Tags:
Comment:
Moving test suit to Special:Blankpage instead
Modified paths:
  • /trunk/phase3/resources/mediawiki/mediawiki.utiltest.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki/mediawiki.utiltest.js
@@ -1,5 +1,6 @@
22 /*
3 - * mediaWiki Debug Test Suit on [[Special:MWUtilJSTest]] (only when ?debug=true)
 3+ * mediaWiki Debug Test Suit.
 4+ * Available on "/Special:BlankPage?action=mwutiltest&debug=true")
45 */
56
67 (function ($, mw) {
@@ -30,7 +31,7 @@
3132 if (this.initialised === false) {
3233 this.initialised = true;
3334 $(function () {
34 - if (wgTitle == 'MWUtilJSTest' && wgCanonicalNamespace == 'Special') {
 35+ if (wgCanonicalSpecialPageName == 'Blankpage' && mw.util.getParamValue('action') === 'mwutiltest') {
3536
3637 // Build page
3738 document.title = 'mediaWiki.util JavaScript Test - ' + wgSiteName;
@@ -76,8 +77,8 @@
7778 'function (string)');
7879 mw.test.addTest('typeof mw.util.getParamValue',
7980 'function (string)');
80 - mw.test.addTest('mw.util.getParamValue(\'debug\')',
81 - 'true (string)');
 81+ mw.test.addTest('mw.util.getParamValue(\'action\')',
 82+ 'mwutiltest (string)');
8283 mw.test.addTest('typeof mw.util.htmlEscape',
8384 'function (string)');
8485 mw.test.addTest('mw.util.htmlEscape(\'<a href="http://mw.org/?a=b&c=d">link</a>\')',

Status & tagging log