aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorTimmy Willison <timmywillisn@gmail.com>2015-05-12 09:58:55 -0400
committerTimmy Willison <timmywillisn@gmail.com>2015-05-12 10:06:42 -0400
commitcbd51c50b3b38574ba86093df34f88eaae5d294f (patch)
treea731647421a2653f20bf91e297f71b907601a8ac /test/unit
parentdd816dbac19d8a83f9b1e9c7d09bc0db436a74b0 (diff)
downloadjquery-cbd51c50b3b38574ba86093df34f88eaae5d294f.tar.gz
jquery-cbd51c50b3b38574ba86093df34f88eaae5d294f.zip
Tests: fix tests in accordance with new :visible behavior
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/css.js10
-rw-r--r--test/unit/effects.js2
2 files changed, 7 insertions, 5 deletions
diff --git a/test/unit/css.js b/test/unit/css.js
index a673b4e51..5a9849c01 100644
--- a/test/unit/css.js
+++ b/test/unit/css.js
@@ -982,9 +982,9 @@ test( "css opacity consistency across browsers (#12685)", function() {
});
test( ":visible/:hidden selectors", function() {
- expect( 18 );
+ expect( 17 );
- var $div, $br, $table, $a;
+ var $div, $table, $a;
ok( jQuery("#nothiddendiv").is(":visible"), "Modifying CSS display: Assert element is visible" );
jQuery("#nothiddendiv").css({ display: "none" });
@@ -1006,8 +1006,10 @@ test( ":visible/:hidden selectors", function() {
$div.css( { width: 0, height: 0, overflow: "hidden" } );
ok( $div.is( ":visible" ), "Div with width and height of 0 is still visible (gh-2227)" );
- $br = jQuery( "<br/>" ).appendTo( "#qunit-fixture" );
- ok( $br.is( ":visible" ), "br element is visible" );
+ // Safari 6-7 and iOS 6-7 report 0 width for br elements
+ // When newer browsers propagate, re-enable this test
+ // $br = jQuery( "<br/>" ).appendTo( "#qunit-fixture" );
+ // ok( $br.is( ":visible" ), "br element is visible" );
$table = jQuery("#table");
$table.html("<tr><td style='display:none'>cell</td><td>cell</td></tr>");
diff --git a/test/unit/effects.js b/test/unit/effects.js
index c444ee8f6..86646ec80 100644
--- a/test/unit/effects.js
+++ b/test/unit/effects.js
@@ -25,7 +25,7 @@ module("effects", {
test("sanity check", function() {
expect(1);
- equal( jQuery("#dl:visible, #qunit-fixture:visible, #foo:visible").length, 2, "QUnit state is correct for testing effects" );
+ equal( jQuery("#dl:visible, #qunit-fixture:visible, #foo:visible").length, 3, "QUnit state is correct for testing effects" );
});
test("show() basic", 1, function() {