From 776012b8b3898fad2e0727880f1dc4af5c7b33c1 Mon Sep 17 00:00:00 2001 From: Michał Gołębiowski Date: Thu, 22 Aug 2013 00:33:57 +0200 Subject: Fix #14084: attach the test div to documentElement, not body. --- test/data/css/cssWidthBeforeDocReady.html | 26 ++++++++++++++++++++++++++ test/unit/css.js | 5 +++++ 2 files changed, 31 insertions(+) create mode 100644 test/data/css/cssWidthBeforeDocReady.html (limited to 'test') diff --git a/test/data/css/cssWidthBeforeDocReady.html b/test/data/css/cssWidthBeforeDocReady.html new file mode 100644 index 000000000..3bdd1b5ab --- /dev/null +++ b/test/data/css/cssWidthBeforeDocReady.html @@ -0,0 +1,26 @@ + + + + + + + +
+ + + + diff --git a/test/unit/css.js b/test/unit/css.js index 82fd6828a..ec7758c34 100644 --- a/test/unit/css.js +++ b/test/unit/css.js @@ -797,6 +797,11 @@ test("css('width') and css('height') should respect box-sizing, see #11004", fun equal( el_dis.css("height"), el_dis.css("height", el_dis.css("height")).css("height"), "css('height') is not respecting box-sizing for disconnected element, see #11004"); }); +testIframeWithCallback( "css('width') should works correctly before document ready", "css/cssWidthBeforeDocReady.html", function( cssWidthBeforeDocReady ) { + expect( 1 ); + strictEqual( cssWidthBeforeDocReady, "100px", "elem.css('width') works correctly before document ready" ); +}); + test("certain css values of 'normal' should be convertable to a number, see #8627", function() { expect ( 2 ); -- cgit v1.2.3