aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/css.js
diff options
context:
space:
mode:
authorOleg <markelog@gmail.com>2013-09-17 18:21:26 +0400
committerOleg <markelog@gmail.com>2013-09-17 18:21:26 +0400
commit94a9a4f1c2db7b80111fe24afc46de7c303f5a29 (patch)
treef035419c2c641c6dfa87479666586900aa0691f6 /test/unit/css.js
parentd16fe84d80d337730199194e9d90e6ada9440d1c (diff)
downloadjquery-94a9a4f1c2db7b80111fe24afc46de7c303f5a29.tar.gz
jquery-94a9a4f1c2db7b80111fe24afc46de7c303f5a29.zip
Correct test assertion of #10227 ticket for IE8
Diffstat (limited to 'test/unit/css.js')
-rw-r--r--test/unit/css.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/test/unit/css.js b/test/unit/css.js
index bbe0c1edc..e6f9c91df 100644
--- a/test/unit/css.js
+++ b/test/unit/css.js
@@ -584,12 +584,8 @@ 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" ),
-
+ var htmlDisplay,
+ html = jQuery( document.documentElement ),
body = jQuery( "body" );
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() {
equal( html.css("display"), "none", "Initial display for html element: none" );
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( html[ 0 ] );