Permalink
Browse files

Ensure all elements are removed from 10006 test block

  • Loading branch information...
1 parent dff11c0 commit ca08d93b72d63d5c6d719f818f8f1ca401dc3cfe @rwaldron rwaldron committed with dmethvin Nov 22, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 test/unit/effects.js
View
@@ -197,26 +197,32 @@ test( "show() resolves correct default display, detached nodes (#10006)", functi
div = jQuery("<div class='hidden'>");
div.show().appendTo("#qunit-fixture");
equal( div.css("display"), "block", "Make sure a detached, pre-hidden( through stylesheets ) div is visible." );
+ div.remove();
div = jQuery("<div style='display: none'>");
div.show().appendTo("#qunit-fixture");
equal( div.css("display"), "block", "Make sure a detached, pre-hidden( through inline style ) div is visible." );
+ div.remove();
span = jQuery("<span class='hidden'/>");
span.show().appendTo("#qunit-fixture");
equal( span.css("display"), "inline", "Make sure a detached, pre-hidden( through stylesheets ) span has default display." );
+ span.remove();
span = jQuery("<span style='display: inline'/>");
span.show().appendTo("#qunit-fixture");
equal( span.css("display"), "inline", "Make sure a detached, pre-hidden( through inline style ) span has default display." );
+ span.remove();
div = jQuery("<div><div class='hidden'></div></div>").children("div");
div.show().appendTo("#qunit-fixture");
equal( div.css("display"), "block", "Make sure a detached, pre-hidden( through stylesheets ) div inside another visible div is visible." );
+ div.remove();
div = jQuery("<div><div style='display: none'></div></div>").children("div");
div.show().appendTo("#qunit-fixture");
equal( div.css("display"), "block", "Make sure a detached, pre-hidden( through inline style ) div inside another visible div is visible." );
+ div.remove();
div = jQuery("div.hidden");
div.detach().show();
@@ -231,14 +237,17 @@ test( "show() resolves correct default display, detached nodes (#10006)", functi
div = jQuery("<div>");
div.show().appendTo("#qunit-fixture");
ok( !!div.get( 0 ).style.display, "Make sure not hidden div has a inline style." );
+ div.remove();
div = jQuery( document.createElement("div") );
div.show().appendTo("#qunit-fixture");
equal( div.css("display"), "block", "Make sure a pre-created element has default display." );
+ div.remove();
div = jQuery("<div style='display: inline'/>");
div.show().appendTo("#qunit-fixture");
equal( div.css("display"), "inline", "Make sure that element has same display when it was created." );
+ div.remove();
});

0 comments on commit ca08d93

Please sign in to comment.