Followup r94609: fix jquery.highlightText test cases on IE, simplify test case setup...
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 16 Aug 2011 19:34:47 +0000 (19:34 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 16 Aug 2011 19:34:47 +0000 (19:34 +0000)
commitff1bb7f22182f42570e7716e05a3f8c8391ae404
treebaca35391fd6d28e624721791628384af2356dd3
parent4948e5671996f2c12ce84d4613b50fa8a239182b
Followup r94609: fix jquery.highlightText test cases on IE, simplify test case setup so new ones can be added more trivially, uncommented the failing test case.

These tests were failing on IE 6, 7, and 8 because the innerHTML rendering of the highlighted text came out in caps and without quotes, such that the string didn't match the provided one. By re-normalizing the expected HTML form this check now works on those browsers. Switching common code to a loop and an array makes it easier to add new test cases: less duplication of code, and no need to manually update the number of test cases.

Note that the third test case was previously commented out, but looks like a serious regression. No longer commented out, so this will fail!
tests/qunit/suites/resources/jquery/jquery.highlightText.test.js