r91422 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91421‎ | r91422 | r91423 >
Date:20:11, 4 July 2011
Author:krinkle
Status:ok
Tags:
Comment:
mediawiki.util.test.js: TestSwarm reports breakage in Chrome4-Linux
- It only appears on Linux not in Mac OS X with the same Chrome version
- Adding extra checks and stops() in attempt to get a more useful report than then sudden stop at:
http://toolserver.org/~krinkle/testswarm/?state=runresults&run_id=1258&client_id=3092#
Modified paths:
  • /trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.util.js (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.util.js
@@ -55,7 +55,7 @@
5656 equal( typeof style, 'object', 'addCSS returned an object' );
5757 strictEqual( style.disabled, false, 'property "disabled" is available and set to false' );
5858
59 - equal( $testEl.css('visibility'), 'hidden', 'Added style properties are in effect' );
 59+ equal( $testEl.css( 'visibility' ), 'hidden', 'Added style properties are in effect' );
6060
6161 // Clean up
6262 $( style.ownerNode )
@@ -64,21 +64,23 @@
6565 });
6666
6767 test( 'toggleToc', function() {
68 - expect(3);
 68+ expect(4);
6969
7070 strictEqual( mw.util.toggleToc(), null, 'Return null if there is no table of contents on the page.' );
7171
72 - var tocHtml =
 72+ var tocHtml =
7373 '<table id="toc" class="toc"><tr><td>' +
7474 '<div id="toctitle">' +
7575 '<h2>Contents</h2>' +
7676 '<span class="toctoggle">&nbsp;[<a href="#" class="internal" id="togglelink">Hide</a>&nbsp;]</span>' +
7777 '</div>' +
7878 '<ul><li></li></ul>' +
79 - '</td></tr></table>';
80 - var $toc = $(tocHtml).appendTo( 'body' );
81 - var $toggleLink = $( '#togglelink' );
 79+ '</td></tr></table>',
 80+ $toc = $(tocHtml).appendTo( 'body' ),
 81+ $toggleLink = $( '#togglelink' );
8282
 83+ strictEqual( $toggleLink.length, 1, 'Toggle link is appended to the page.' );
 84+
8385 // Toggle animation is asynchronous
8486 // QUnit should not finish this test() untill they are all done
8587 stop();
@@ -90,6 +92,7 @@
9193 $toc.remove();
9294 };
9395 var actionB = function() {
 96+ start(); stop();
9497 strictEqual( mw.util.toggleToc( $toggleLink, actionC ), true, 'Return boolean true if the TOC is now visible.' );
9598 };
9699 var actionA = function() {

Status & tagging log