Skip to content
Permalink
Browse files

Updated the show() tests to work without the use of jQuery.browser (t…

…he test suite now passes 100% in IE8).
  • Loading branch information
jeresig committed Feb 17, 2009
1 parent b536d2a commit 1ac087f6f90eb41fe79d46b7e1f09cc7e2125670
Showing with 10 additions and 7 deletions.
  1. +10 −7 test/unit/core.js
@@ -1532,21 +1532,24 @@ test("show()", function() {
ok( pass, "Show" );

jQuery("#main").append('<div id="show-tests"><div><p><a href="#"></a></p><code></code><pre></pre><span></span></div><table><thead><tr><th></th></tr></thead><tbody><tr><td></td></tr></tbody></table><ul><li></li></ul></div>');

var old = jQuery("#show-tests table").show().css("display") !== "table";

var test = {
"div" : "block",
"p" : "block",
"a" : "inline",
"code" : "inline",
"pre" : "block",
"span" : "inline",
"table" : jQuery.browser.msie ? "block" : "table",
"thead" : jQuery.browser.msie ? "block" : "table-header-group",
"tbody" : jQuery.browser.msie ? "block" : "table-row-group",
"tr" : jQuery.browser.msie ? "block" : "table-row",
"th" : jQuery.browser.msie ? "block" : "table-cell",
"td" : jQuery.browser.msie ? "block" : "table-cell",
"table" : old ? "block" : "table",
"thead" : old ? "block" : "table-header-group",
"tbody" : old ? "block" : "table-row-group",
"tr" : old ? "block" : "table-row",
"th" : old ? "block" : "table-cell",
"td" : old ? "block" : "table-cell",
"ul" : "block",
"li" : jQuery.browser.msie ? "block" : "list-item"
"li" : old ? "block" : "list-item"
};

jQuery.each(test, function(selector, expected) {

0 comments on commit 1ac087f

Please sign in to comment.
You can’t perform that action at this time.