r76316 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76315‎ | r76316 | r76317 >
Date:17:01, 8 November 2010
Author:krinkle
Status:ok (Comments)
Tags:
Comment:
Making comments added in r76283 more clear + added mw.html to test suite
Modified paths:
  • /trunk/phase3/resources/mediawiki.util/mediawiki.util.test.js (modified) (history)
  • /trunk/phase3/resources/mediawiki/mediawiki.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki.util/mediawiki.util.test.js
@@ -68,6 +68,8 @@
6969 'object (string)');
7070 mw.test.addTest('typeof mw.util',
7171 'object (string)');
 72+ mw.test.addTest('typeof mw.html',
 73+ 'object (string)');
7274 mw.test.addTest('typeof String.prototype.ucFirst',
7375 'function (string)');
7476 mw.test.addTest('\'mediawiki\'.ucFirst()',
@@ -88,16 +90,22 @@
8991 'function (string)');
9092 mw.test.addTest('mw.util.getParamValue( \'action\' )',
9193 'mwutiltest (string)');
 94+ mw.test.addTest('mw.util.getParamValue( \'foo\', \'http://mw.org/?foo=wrong&foo=right#&foo=bad\' )',
 95+ 'right (string)');
9296 mw.test.addTest('mw.util.tooltipAccessKeyRegexp.constructor.name',
9397 'RegExp (string)');
9498 mw.test.addTest('typeof mw.util.updateTooltipAccessKeys',
9599 'function (string)');
96100 mw.test.addTest('typeof mw.util.addPortletLink',
97101 'function (string)');
98 - mw.test.addTest('typeof mw.util.addPortletLink("p-tb", "http://mediawiki.org/", "MediaWiki.org", "t-mworg", "Go to MediaWiki.org ", "m", "#t-print")',
 102+ mw.test.addTest('typeof mw.util.addPortletLink( "p-tb", "http://mediawiki.org/", "MediaWiki.org", "t-mworg", "Go to MediaWiki.org ", "m", "#t-print" )',
99103 'object (string)');
100 - mw.test.addTest('a = mw.util.addPortletLink("p-tb", "http://mediawiki.org/", "MediaWiki.org", "t-mworg", "Go to MediaWiki.org ", "m", "#t-print"); $(a).text();',
 104+ mw.test.addTest('a = mw.util.addPortletLink( "p-tb", "http://mediawiki.org/", "MediaWiki.org", "t-mworg", "Go to MediaWiki.org ", "m", "#t-print" ); $(a).text();',
101105 'MediaWiki.org (string)');
 106+ mw.test.addTest('mw.html.element( \'hr\' )',
 107+ '<hr/> (string)');
 108+ mw.test.addTest('mw.html.element( \'img\', { \'src\': \'http://mw.org/?title=Main page&action=edit\' } )',
 109+ '<img src="http://mw.org/?title=Main page&amp;action=edit"/> (string)');
102110
103111 // Run tests and compare results
104112 var exec,
Index: trunk/phase3/resources/mediawiki/mediawiki.js
@@ -968,11 +968,11 @@
969969 s += ' ' + attrName + '="' + this.escape( attrs[attrName] ) + '"';
970970 }
971971 if ( typeof contents == 'undefined' || contents === null ) {
972 - // Short close tag
 972+ // Self close tag
973973 s += '/>';
974974 return s;
975975 }
976 - // Regular close tag
 976+ // Regular open tag
977977 s += '>';
978978 if (typeof contents === 'string') {
979979 // Escaped

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r76283* Moved htmlEscape from mediawiki.util.js to mediawiki.js so that it can be u...tstarling23:46, 7 November 2010

Comments

#Comment by Tim Starling (talk | contribs)   23:11, 8 November 2010

Actually it's called an "empty element tag", not either of the things in that diff.

Status & tagging log