diff options
author | jeresig <jeresig@gmail.com> | 2011-04-12 00:37:51 -0400 |
---|---|---|
committer | jeresig <jeresig@gmail.com> | 2011-04-12 00:37:51 -0400 |
commit | db80ad94d5f8d008b44b4b4b13157b5aeea14c4f (patch) | |
tree | 4a286ef316e51e41b0ff5e2ae92e3d5cfdbf8a77 /test | |
parent | 430d9e0b066512f00ceb7573249b45747d7792ff (diff) | |
parent | 272b8d69dcff771ffdb61ccd33c4e83eaea8ca50 (diff) | |
download | jquery-db80ad94d5f8d008b44b4b4b13157b5aeea14c4f.tar.gz jquery-db80ad94d5f8d008b44b4b4b13157b5aeea14c4f.zip |
Merge branch 'fix_8402' of https://github.com/lrbabe/jquery into lrbabe-fix_8402
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/css.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/unit/css.js b/test/unit/css.js index 621728cd6..cd2019fe2 100644 --- a/test/unit/css.js +++ b/test/unit/css.js @@ -395,3 +395,17 @@ test("$().css override !important css declarations (bug #4427)", function(){ equals( div.css("background-color"), "rgb(0, 255, 0)", "Background color is overrided to rgb(0, 255, 0)" ); }); + +test("jQuery.cssProps behavior, (bug #8402)", function() { + var div = jQuery( "<div>" ).appendTo(document.body).css({ + position: "absolute", + top: 0, + left: 10 + }); + jQuery.cssProps.top = "left"; + equal( div.css("top"), "10px", "the fixed property is used when accessing the computed style"); + div.css("top", "100px"); + equal( div[0].style.left, "100px", "the fixed property is used when setting the style"); + // cleanup jQuery.cssProps + jQuery.cssProps.top = undefined; +}); |