From b326225d9087ee8c5648ace3cf88feab0330353d Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Mon, 21 Jan 2013 18:03:07 -0500 Subject: Fix failing tests, add support for empty spans in Opera. Supplements #13132, #10406. --- test/index.html | 2 +- test/unit/css.js | 6 +++++- test/unit/selector.js | 23 ----------------------- 3 files changed, 6 insertions(+), 25 deletions(-) (limited to 'test') diff --git a/test/index.html b/test/index.html index 45204e27e..9f8edfe20 100644 --- a/test/index.html +++ b/test/index.html @@ -87,7 +87,7 @@ -
+

See this blog entry for more information.

diff --git a/test/unit/css.js b/test/unit/css.js index d1cf33304..4d0cec3bb 100644 --- a/test/unit/css.js +++ b/test/unit/css.js @@ -857,7 +857,7 @@ test( "css opacity consistency across browsers (#12685)", function() { }); test( ":visible/:hidden selectors", function() { - expect( 13 ); + expect( 16 ); ok( jQuery("#nothiddendiv").is(":visible"), "Modifying CSS display: Assert element is visible" ); jQuery("#nothiddendiv").css({ display: "none" }); @@ -884,6 +884,10 @@ test( ":visible/:hidden selectors", function() { equal(jQuery("#table td:visible").length, 1, "hidden cell is not perceived as visible (#4512). Works on table elements"); $table.css("display", "none").html("cellcell"); equal(jQuery("#table td:visible").length, 0, "hidden cell children not perceived as visible (#4512)"); + + t( "Is Visible", "#qunit-fixture div:visible:lt(2)", ["foo", "nothiddendiv"] ); + t( "Is Not Hidden", "#qunit-fixture:hidden", [] ); + t( "Is Hidden", "#form input:hidden", ["hidden1","hidden2"] ); }); asyncTest( "Clearing a Cloned Element's Style Shouldn't Clear the Original Element's Style (#8908)", 24, function() { diff --git a/test/unit/selector.js b/test/unit/selector.js index 21113207c..07e563da3 100644 --- a/test/unit/selector.js +++ b/test/unit/selector.js @@ -63,29 +63,6 @@ test("attributes - jQuery only", function() { ); }); -if ( jQuery.css ) { - test("pseudo - visibility", function() { - expect( 9 ); - - t( "Is Visible", "#qunit-fixture div:visible:lt(2)", ["foo", "nothiddendiv"] ); - t( "Is Not Hidden", "#qunit-fixture:hidden", [] ); - t( "Is Hidden", "#form input:hidden", ["hidden1","hidden2"] ); - - var $div = jQuery("

").appendTo("body"); - $div.css({ fontSize: 0, lineHeight: 0 });// IE also needs to set font-size and line-height to 0 - $div.css( "width", 1 ).css( "height", 0 ); - t( "Is Visible", "#nothiddendivchild:visible", ["nothiddendivchild"] ); - t( "Is Not Visible", "#nothiddendivchild:hidden", [] ); - $div.css( "width", 0 ).css( "height", 1 ); - t( "Is Visible", "#nothiddendivchild:visible", ["nothiddendivchild"] ); - t( "Is Not Visible", "#nothiddendivchild:hidden", [] ); - $div.css( "width", 1 ).css( "height", 1 ); - t( "Is Visible", "#nothiddendivchild:visible", ["nothiddendivchild"] ); - t( "Is Not Visible", "#nothiddendivchild:hidden", [] ); - $div.remove(); - }); -} - test("disconnected nodes", function() { expect( 4 ); var $opt = jQuery("").attr("value", "whipit").appendTo("#qunit-fixture").detach(); -- cgit v1.2.3