mw.util.test fixes
authorKrinkle <krinkle@users.mediawiki.org>
Tue, 3 May 2011 21:57:33 +0000 (21:57 +0000)
committerKrinkle <krinkle@users.mediawiki.org>
Tue, 3 May 2011 21:57:33 +0000 (21:57 +0000)
commit6c1faaaccf41907a5c5ea3b39f96c9ba981c6154
treee534e691e789d6578f4896e02a97f7d44ed5b92c
parentec1b18ef1a0af4819fdda2e6f400b9d1974e1986
mw.util.test fixes
* Remove hiding of rows after the test, in almost all cases someone will want to unhide these, especially in case of an error; Plus, there were some inconsistencies in firefox with the hovering of the last (non-collapsible) row.
* Changing mw.util.addCSS to a style that is actually visible on the action=mwutiltest page.
* Making the entire row red in case of errors (easier finding of the error)
* Moving $.isDomElement tests to mw.util.test instead of in comments
* Adding missing tests for all mw.util properties
* Fix bug where $.isDomElement fails if the passed argument isn't an object at all (eg. null or undefined). Check variable first before checking object property (<code>$.isDomElement( document.getElementById('notexist') );</code> returned TypeError: Result of expression 'el' [null] is not an object.)
** Adding test for this
* Try/Catch the evaluation
** Reports catched exceptions through mw.log instead of using throw. This way non-consoled browsers can be easily debugged through mw.log's console.
** Fixes: (bug 28803) mw.util.test doesn't handle exceptions
* Using a canonical variable instead of a localized one in the tests.
** Fixes: (bug 28788) 2 tests related to wgTitle in mediawiki.util.test are broken for non-English wikis.
resources/mediawiki.util/mediawiki.util.test.js
resources/mediawiki/mediawiki.js