Commit 94a9a4f1 authored by Oleg's avatar Oleg

Correct test assertion of #10227 ticket for IE8

parent d16fe84d
...@@ -584,12 +584,8 @@ test( "show() resolves correct default display for detached nodes", function(){ ...@@ -584,12 +584,8 @@ test( "show() resolves correct default display for detached nodes", function(){
}); });
test("show() resolves correct default display #10227", 4, function() { test("show() resolves correct default display #10227", 4, function() {
var html = jQuery( document.documentElement ), var htmlDisplay,
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 = jQuery( "body" );
body.append( "<p class='ddisplay'>a<style>body{display:none}</style></p>" ); body.append( "<p class='ddisplay'>a<style>body{display:none}</style></p>" );
...@@ -604,7 +600,10 @@ test("show() resolves correct default display #10227", 4, function() { ...@@ -604,7 +600,10 @@ test("show() resolves correct default display #10227", 4, function() {
equal( html.css("display"), "none", "Initial display for html element: none" ); equal( html.css("display"), "none", "Initial display for html element: none" );
html.show(); html.show();
equal( html.css( "display" ), htmlDefaultDisplay, "Correct display for html element: " + htmlDefaultDisplay ); htmlDisplay = html.css( "display" );
// Check for "inline" value needed for older browsers
ok( "inline" === htmlDisplay || "block" === htmlDisplay, "Correct display for html element" );
jQuery._removeData( body[ 0 ] ); jQuery._removeData( body[ 0 ] );
jQuery._removeData( html[ 0 ] ); jQuery._removeData( html[ 0 ] );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment