diff options
author | Mike Sherov <mike.sherov@gmail.com> | 2012-06-06 17:06:03 -0400 |
---|---|---|
committer | Rick Waldron <waldron.rick@gmail.com> | 2012-06-06 17:06:03 -0400 |
commit | 4dcd7dd324fe7362842ce805b05f88929655fc79 (patch) | |
tree | 3e7f41545583ce9b3337be76613d97a1131b9575 /test/unit/dimensions.js | |
parent | e680f36ca096090a6e699ce0eece5b3635a46f47 (diff) | |
download | jquery-4dcd7dd324fe7362842ce805b05f88929655fc79.tar.gz jquery-4dcd7dd324fe7362842ce805b05f88929655fc79.zip |
Fixe dimensions tests. No core code changes. Supplements #11856
Diffstat (limited to 'test/unit/dimensions.js')
-rw-r--r-- | test/unit/dimensions.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/unit/dimensions.js b/test/unit/dimensions.js index ed065f3c7..a7463ff28 100644 --- a/test/unit/dimensions.js +++ b/test/unit/dimensions.js @@ -415,10 +415,16 @@ test("setters with and without box-sizing:border-box", function(){ }); testIframe( "dimensions/documentSmall", "window vs. small document", function( jQuery, window, document ) { - expect(2); + // this test is practically tautological, but there is a bug in IE8 + // with no simple workaround, so this test exposes the bug and works around it + if ( document.body.offsetWidth >= document.documentElement.offsetWidth ) { + expect( 2 ); - equal( jQuery( document ).height(), jQuery( window ).height(), "document height matches window height" ); - equal( jQuery( document ).width(), jQuery( window ).width(), "document width matches window width" ); + equal( jQuery( document ).height(), jQuery( window ).height(), "document height matches window height" ); + equal( jQuery( document ).width(), jQuery( window ).width(), "document width matches window width" ); + } else { + expect( 0 ); + } }); testIframe( "dimensions/documentLarge", "window vs. large document", function( jQuery, window, document ) { |