From 3225d6149655f68939111ffc76a1dffeb329afe9 Mon Sep 17 00:00:00 2001 From: Mike Sherov Date: Tue, 5 Jun 2012 15:29:46 -0400 Subject: Make dimensions modular, adds optional build flag. Fixes #11856 --- test/unit/dimensions.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/unit/dimensions.js') 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( "
" ).width(400).appendTo( "#qunit-fixture" ), + el = jQuery( "
" ).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" ); }); + +} -- cgit v1.2.3