r94238 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94237‎ | r94238 | r94239 >
Date:12:42, 11 August 2011
Author:krinkle
Status:ok (Comments)
Tags:
Comment:
Oh, right.

IE6/7 doesn't support that.
( Thanks TestSwarm, http://toolserver.org/~krinkle/testswarm/job/289/ )

Changing to a normal raises().

(Follows-up r94237)
Modified paths:
  • /trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.Title.js (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.Title.js
@@ -120,10 +120,8 @@
121121 _titleConfig();
122122
123123 raises(function() {
124 -
125124 var title = new mw.Title( '' );
126 -
127 - }, new RegExp( $.escapeRE( 'Could not parse title' ) ), 'Throw error "Could not parse title" on empty string' );
 125+ }, 'Throw error on empty string' );
128126 });
129127
130128 test( 'Case-sensivity', function() {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r94237mediawiki.Title fix for IE....krinkle12:36, 11 August 2011

Comments

#Comment by Catrope (talk | contribs)   12:45, 11 August 2011

Can't you just use /Could not parse title/ ? Exactly what does IE6/7 not support here?

#Comment by Krinkle (talk | contribs)   22:01, 5 December 2011

I don't know exactly why or how, but this is the abstracted case: http://jsfiddle.net/teE24/3/

QUnit internally checks if the argument passed for expected is a regex, if it is it does expected.test( e );.

This works fine in modern browsers, but in IE7 it returns false.

Status & tagging log