Skip to content

Commit cbd51c5

Browse files
committed
Tests: fix tests in accordance with new :visible behavior
1 parent dd816db commit cbd51c5

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

test/unit/css.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -982,9 +982,9 @@ test( "css opacity consistency across browsers (#12685)", function() {
982982
});
983983

984984
test( ":visible/:hidden selectors", function() {
985-
expect( 18 );
985+
expect( 17 );
986986

987-
var $div, $br, $table, $a;
987+
var $div, $table, $a;
988988

989989
ok( jQuery("#nothiddendiv").is(":visible"), "Modifying CSS display: Assert element is visible" );
990990
jQuery("#nothiddendiv").css({ display: "none" });
@@ -1006,8 +1006,10 @@ test( ":visible/:hidden selectors", function() {
10061006
$div.css( { width: 0, height: 0, overflow: "hidden" } );
10071007
ok( $div.is( ":visible" ), "Div with width and height of 0 is still visible (gh-2227)" );
10081008

1009-
$br = jQuery( "<br/>" ).appendTo( "#qunit-fixture" );
1010-
ok( $br.is( ":visible" ), "br element is visible" );
1009+
// Safari 6-7 and iOS 6-7 report 0 width for br elements
1010+
// When newer browsers propagate, re-enable this test
1011+
// $br = jQuery( "<br/>" ).appendTo( "#qunit-fixture" );
1012+
// ok( $br.is( ":visible" ), "br element is visible" );
10111013

10121014
$table = jQuery("#table");
10131015
$table.html("<tr><td style='display:none'>cell</td><td>cell</td></tr>");

test/unit/effects.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module("effects", {
2525

2626
test("sanity check", function() {
2727
expect(1);
28-
equal( jQuery("#dl:visible, #qunit-fixture:visible, #foo:visible").length, 2, "QUnit state is correct for testing effects" );
28+
equal( jQuery("#dl:visible, #qunit-fixture:visible, #foo:visible").length, 3, "QUnit state is correct for testing effects" );
2929
});
3030

3131
test("show() basic", 1, function() {

0 commit comments

Comments
 (0)