@@ -944,29 +944,31 @@ test( "css opacity consistency across browsers (#12685)", function() {
944944} ) ;
945945
946946test ( ":visible/:hidden selectors" , function ( ) {
947- expect ( 13 ) ;
947+ expect ( 16 ) ;
948+
949+ var $newDiv , $br , $table ;
948950
949951 ok ( jQuery ( "#nothiddendiv" ) . is ( ":visible" ) , "Modifying CSS display: Assert element is visible" ) ;
950952 jQuery ( "#nothiddendiv" ) . css ( { display : "none" } ) ;
951953 ok ( ! jQuery ( "#nothiddendiv" ) . is ( ":visible" ) , "Modified CSS display: Assert element is hidden" ) ;
952- jQuery ( "#nothiddendiv" ) . css ( { "display" : "block" } ) ;
954+ jQuery ( "#nothiddendiv" ) . css ( { "display" : "block" } ) ;
953955 ok ( jQuery ( "#nothiddendiv" ) . is ( ":visible" ) , "Modified CSS display: Assert element is visible" ) ;
954- ok ( jQuery ( window ) . is ( ":visible" ) || true , "Calling is(':visible') on window does not throw an exception (#10267)" ) ;
955- ok ( jQuery ( document ) . is ( ":visible" ) || true , "Calling is(':visible') on document does not throw an exception (#10267)" ) ;
956+ ok ( ! jQuery ( window ) . is ( ":visible" ) , "Calling is(':visible') on window does not throw an exception (#10267). " ) ;
957+ ok ( ! jQuery ( document ) . is ( ":visible" ) , "Calling is(':visible') on document does not throw an exception (#10267). " ) ;
956958
957959 ok ( jQuery ( "#nothiddendiv" ) . is ( ":visible" ) , "Modifying CSS display: Assert element is visible" ) ;
958960 jQuery ( "#nothiddendiv" ) . css ( "display" , "none" ) ;
959961 ok ( ! jQuery ( "#nothiddendiv" ) . is ( ":visible" ) , "Modified CSS display: Assert element is hidden" ) ;
960962 jQuery ( "#nothiddendiv" ) . css ( "display" , "block" ) ;
961963 ok ( jQuery ( "#nothiddendiv" ) . is ( ":visible" ) , "Modified CSS display: Assert element is visible" ) ;
962964
963- // ok( !jQuery("#siblingspan").is(":visible"), "Span with no content not visible (#13132)" );
964- // var $newDiv = jQuery("<div><span></span></div>").appendTo("#qunit-fixture");
965- // equal( $newDiv.find(":visible").length, 0, "Span with no content not visible (#13132)" );
966- // var $br = jQuery("<br/>").appendTo("#qunit-fixture");
967- // ok( !$br.is(":visible"), "br element not visible (#10406)");
965+ ok ( ! jQuery ( "#siblingspan" ) . is ( ":visible" ) , "Span with no content not visible (#13132)" ) ;
966+ $newDiv = jQuery ( "<div><span></span></div>" ) . appendTo ( "#qunit-fixture" ) ;
967+ equal ( $newDiv . find ( ":visible" ) . length , 0 , "Span with no content not visible (#13132)" ) ;
968+ $br = jQuery ( "<br/>" ) . appendTo ( "#qunit-fixture" ) ;
969+ ok ( ! $br . is ( ":visible" ) , "br element not visible (#10406)" ) ;
968970
969- var $table = jQuery ( "#table" ) ;
971+ $table = jQuery ( "#table" ) ;
970972 $table . html ( "<tr><td style='display:none'>cell</td><td>cell</td></tr>" ) ;
971973 equal ( jQuery ( "#table td:visible" ) . length , 1 , "hidden cell is not perceived as visible (#4512). Works on table elements" ) ;
972974 $table . css ( "display" , "none" ) . html ( "<tr><td>cell</td><td>cell</td></tr>" ) ;
0 commit comments