@@ -886,29 +886,31 @@ test( "css opacity consistency across browsers (#12685)", function() {
886
886
} ) ;
887
887
888
888
test ( ":visible/:hidden selectors" , function ( ) {
889
- expect ( 13 ) ;
889
+ expect ( 16 ) ;
890
+
891
+ var $newDiv , $br , $table ;
890
892
891
893
ok ( jQuery ( "#nothiddendiv" ) . is ( ":visible" ) , "Modifying CSS display: Assert element is visible" ) ;
892
894
jQuery ( "#nothiddendiv" ) . css ( { display : "none" } ) ;
893
895
ok ( ! jQuery ( "#nothiddendiv" ) . is ( ":visible" ) , "Modified CSS display: Assert element is hidden" ) ;
894
- jQuery ( "#nothiddendiv" ) . css ( { "display" : "block" } ) ;
896
+ jQuery ( "#nothiddendiv" ) . css ( { "display" : "block" } ) ;
895
897
ok ( jQuery ( "#nothiddendiv" ) . is ( ":visible" ) , "Modified CSS display: Assert element is visible" ) ;
896
- ok ( jQuery ( window ) . is ( ":visible" ) || true , "Calling is(':visible') on window does not throw an exception (#10267)" ) ;
897
- ok ( jQuery ( document ) . is ( ":visible" ) || true , "Calling is(':visible') on document does not throw an exception (#10267)" ) ;
898
+ ok ( ! jQuery ( window ) . is ( ":visible" ) , "Calling is(':visible') on window does not throw an exception (#10267). " ) ;
899
+ ok ( ! jQuery ( document ) . is ( ":visible" ) , "Calling is(':visible') on document does not throw an exception (#10267). " ) ;
898
900
899
901
ok ( jQuery ( "#nothiddendiv" ) . is ( ":visible" ) , "Modifying CSS display: Assert element is visible" ) ;
900
902
jQuery ( "#nothiddendiv" ) . css ( "display" , "none" ) ;
901
903
ok ( ! jQuery ( "#nothiddendiv" ) . is ( ":visible" ) , "Modified CSS display: Assert element is hidden" ) ;
902
904
jQuery ( "#nothiddendiv" ) . css ( "display" , "block" ) ;
903
905
ok ( jQuery ( "#nothiddendiv" ) . is ( ":visible" ) , "Modified CSS display: Assert element is visible" ) ;
904
906
905
- // ok( !jQuery("#siblingspan").is(":visible"), "Span with no content not visible (#13132)" );
906
- // var $newDiv = jQuery("<div><span></span></div>").appendTo("#qunit-fixture");
907
- // equal( $newDiv.find(":visible").length, 0, "Span with no content not visible (#13132)" );
908
- // var $br = jQuery("<br/>").appendTo("#qunit-fixture");
909
- // ok( !$br.is(":visible"), "br element not visible (#10406)");
907
+ ok ( ! jQuery ( "#siblingspan" ) . is ( ":visible" ) , "Span with no content not visible (#13132)" ) ;
908
+ $newDiv = jQuery ( "<div><span></span></div>" ) . appendTo ( "#qunit-fixture" ) ;
909
+ equal ( $newDiv . find ( ":visible" ) . length , 0 , "Span with no content not visible (#13132)" ) ;
910
+ $br = jQuery ( "<br/>" ) . appendTo ( "#qunit-fixture" ) ;
911
+ ok ( ! $br . is ( ":visible" ) , "br element not visible (#10406)" ) ;
910
912
911
- var $table = jQuery ( "#table" ) ;
913
+ $table = jQuery ( "#table" ) ;
912
914
$table . html ( "<tr><td style='display:none'>cell</td><td>cell</td></tr>" ) ;
913
915
equal ( jQuery ( "#table td:visible" ) . length , 1 , "hidden cell is not perceived as visible (#4512). Works on table elements" ) ;
914
916
$table . css ( "display" , "none" ) . html ( "<tr><td>cell</td><td>cell</td></tr>" ) ;
0 commit comments