@@ -886,29 +886,31 @@ test( "css opacity consistency across browsers (#12685)", function() {
886886} ) ;
887887
888888test ( ":visible/:hidden selectors" , function ( ) {
889- expect ( 13 ) ;
889+ expect ( 16 ) ;
890+
891+ var $newDiv , $br , $table ;
890892
891893 ok ( jQuery ( "#nothiddendiv" ) . is ( ":visible" ) , "Modifying CSS display: Assert element is visible" ) ;
892894 jQuery ( "#nothiddendiv" ) . css ( { display : "none" } ) ;
893895 ok ( ! jQuery ( "#nothiddendiv" ) . is ( ":visible" ) , "Modified CSS display: Assert element is hidden" ) ;
894- jQuery ( "#nothiddendiv" ) . css ( { "display" : "block" } ) ;
896+ jQuery ( "#nothiddendiv" ) . css ( { "display" : "block" } ) ;
895897 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). " ) ;
898900
899901 ok ( jQuery ( "#nothiddendiv" ) . is ( ":visible" ) , "Modifying CSS display: Assert element is visible" ) ;
900902 jQuery ( "#nothiddendiv" ) . css ( "display" , "none" ) ;
901903 ok ( ! jQuery ( "#nothiddendiv" ) . is ( ":visible" ) , "Modified CSS display: Assert element is hidden" ) ;
902904 jQuery ( "#nothiddendiv" ) . css ( "display" , "block" ) ;
903905 ok ( jQuery ( "#nothiddendiv" ) . is ( ":visible" ) , "Modified CSS display: Assert element is visible" ) ;
904906
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)" ) ;
910912
911- var $table = jQuery ( "#table" ) ;
913+ $table = jQuery ( "#table" ) ;
912914 $table . html ( "<tr><td style='display:none'>cell</td><td>cell</td></tr>" ) ;
913915 equal ( jQuery ( "#table td:visible" ) . length , 1 , "hidden cell is not perceived as visible (#4512). Works on table elements" ) ;
914916 $table . css ( "display" , "none" ) . html ( "<tr><td>cell</td><td>cell</td></tr>" ) ;
0 commit comments