aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMike Sherov <mike.sherov@gmail.com>2011-10-28 10:53:42 -0400
committertimmywil <timmywillisn@gmail.com>2011-10-28 10:53:42 -0400
commitfa0e801f52cdc97832ef0b696caa1eda33fc6b36 (patch)
tree7a007138996eaa4b8ad671f251fe4c9781ae4a43 /test
parent5c0c86378a602fbc06535617fc5d712fa6d6e024 (diff)
downloadjquery-fa0e801f52cdc97832ef0b696caa1eda33fc6b36.tar.gz
jquery-fa0e801f52cdc97832ef0b696caa1eda33fc6b36.zip
Landing pull request 562. Make sure runtimeStyle isn't affected by dimensions. Fixes #9233.
More Details: - https://github.com/jquery/jquery/pull/562 - http://bugs.jquery.com/ticket/9233
Diffstat (limited to 'test')
-rw-r--r--test/unit/dimensions.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/unit/dimensions.js b/test/unit/dimensions.js
index 768816803..3ccf651ba 100644
--- a/test/unit/dimensions.js
+++ b/test/unit/dimensions.js
@@ -245,6 +245,29 @@ test("child of a hidden elem has accurate inner/outer/Width()/Height() see #944
$divNormal.remove();
});
+test("getting dimensions shouldnt modify runtimeStyle see #9233", function() {
+ expect( 1 );
+
+ var $div = jQuery( "<div>" ).appendTo( "#qunit-fixture" ),
+ div = $div.get( 0 ),
+ runtimeStyle = div.runtimeStyle;
+
+ if ( runtimeStyle ) {
+ div.runtimeStyle.marginLeft = "12em";
+ div.runtimeStyle.left = "11em";
+ }
+
+ $div.outerWidth( true );
+
+ if ( runtimeStyle ) {
+ equal( div.runtimeStyle.left, "11em", "getting dimensions modifies runtimeStyle, see #9233" );
+ } else {
+ ok( true, "this browser doesnt support runtimeStyle, see #9233" );
+ }
+
+ $div.remove();
+});
+
test("outerHeight()", function() {
expect(11);