mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Fix memory leaks in tests for css module
This commit is contained in:
parent
fd2964237f
commit
ff156d77b2
@ -585,6 +585,11 @@ test( "show() resolves correct default display for detached nodes", function(){
|
||||
|
||||
test("show() resolves correct default display #10227", 4, function() {
|
||||
var html = jQuery( document.documentElement ),
|
||||
|
||||
// In new browsers default display for HTML element is "block"
|
||||
// for older browsers display equals "inline"
|
||||
htmlDefaultDisplay = html.css( "display" ),
|
||||
|
||||
body = jQuery( "body" );
|
||||
|
||||
body.append( "<p class='ddisplay'>a<style>body{display:none}</style></p>" );
|
||||
@ -599,8 +604,10 @@ test("show() resolves correct default display #10227", 4, function() {
|
||||
equal( html.css("display"), "none", "Initial display for html element: none" );
|
||||
|
||||
html.show();
|
||||
equal( html.css( "display" ), "block", "Correct display for html element: block" );
|
||||
equal( html.css( "display" ), htmlDefaultDisplay, "Correct display for html element: " + htmlDefaultDisplay );
|
||||
|
||||
jQuery._removeData( body[ 0 ] );
|
||||
jQuery._removeData( html[ 0 ] );
|
||||
jQuery( ".ddisplay" ).remove();
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user