diff options
author | Mike Sherov <mike.sherov@gmail.com> | 2012-06-05 15:29:46 -0400 |
---|---|---|
committer | Rick Waldron <waldron.rick@gmail.com> | 2012-06-05 15:29:46 -0400 |
commit | 3225d6149655f68939111ffc76a1dffeb329afe9 (patch) | |
tree | 5b34dfd8befdf2971846c958b2b68c36aa3cb56b /test/unit/dimensions.js | |
parent | 8265fa08376343d04c7c8c4796ebd4dcc7e3d2e0 (diff) | |
download | jquery-3225d6149655f68939111ffc76a1dffeb329afe9.tar.gz jquery-3225d6149655f68939111ffc76a1dffeb329afe9.zip |
Make dimensions modular, adds optional build flag. Fixes #11856
Diffstat (limited to 'test/unit/dimensions.js')
-rw-r--r-- | test/unit/dimensions.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/dimensions.js b/test/unit/dimensions.js index 49f6bcbad..ed065f3c7 100644 --- a/test/unit/dimensions.js +++ b/test/unit/dimensions.js @@ -1,3 +1,5 @@ +if( jQuery.fn.width ) { + module("dimensions", { teardown: moduleTeardown }); function pass( val ) { @@ -290,6 +292,13 @@ test("getting dimensions shouldnt modify runtimeStyle see #9233", function() { $div.remove(); }); +test("outerWidth(true) returning % instead of px in Webkit, see #10639", function() { + var container = jQuery( "<div/>" ).width(400).appendTo( "#qunit-fixture" ), + el = jQuery( "<div/>" ).css({ width: "50%", marginRight: "50%" }).appendTo( container ); + + equal( el.outerWidth(true), 400, "outerWidth(true) and css('margin') returning % instead of px in Webkit, see #10639" ); +}); + test("box-sizing:border-box child of a hidden elem (or unconnected node) has accurate inner/outer/Width()/Height() see #10413", function() { expect(16); @@ -418,3 +427,5 @@ testIframe( "dimensions/documentLarge", "window vs. large document", function( j ok( jQuery( document ).height() > jQuery( window ).height(), "document height is larger than window height" ); ok( jQuery( document ).width() > jQuery( window ).width(), "document width is larger than window width" ); }); + +} |