Fixing two broken tests in jquery.autoEllipsis.js for IE6 and Opera:
authorKrinkle <krinkle@users.mediawiki.org>
Tue, 14 Jun 2011 01:38:26 +0000 (01:38 +0000)
committerKrinkle <krinkle@users.mediawiki.org>
Tue, 14 Jun 2011 01:38:26 +0000 (01:38 +0000)
commit7af4de885ce7cf19d7faae1727e3e152e3076348
tree64cba7aacce42dd24ba878f018e242c177db0c4e
parenteaafdc22281e46d87738a555ab4ef7de663be41b
Fixing two broken tests in jquery.autoEllipsis.js for IE6 and Opera:
* Mysterious test failure in IE6 in jquery.autoEllipsis.js finally figured. Way simpler than we thought. In IE6 width behaves like min-width, so adding one or two characters to a <span> with white-space:nowrap inside a <div> with a  fixed width will NOT (as other browsers do) make the span-width wider than the div-width, instead the div-width will happily increase as well.
* 2nd breakage fixed: In some cases adding 1 character did not widen the span, probably because of some edge case with narrow fonts and characters like "i" which are so small that they're just on the edge. Changed the test to add 2 characters instead of 1 to overcome this problem.

This new version of the test suite was already pushed to TestSwarm from my own account (instead of the MediaWiki-SVN account) and confirmed to work in IE6. Yay!

Not-pretty: Browser-sniffing for IE6 in a unit test..
tests/qunit/suites/resources/jquery/jquery.autoEllipsis.js