diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/css.js | 9 | ||||
-rw-r--r-- | test/unit/dimensions.js | 7 |
2 files changed, 9 insertions, 7 deletions
diff --git a/test/unit/css.js b/test/unit/css.js index 9880a8bdb..45aee9f06 100644 --- a/test/unit/css.js +++ b/test/unit/css.js @@ -641,6 +641,15 @@ test("marginRight computed style (bug #3333)", function() { equal($div.css("marginRight"), "0px", "marginRight correctly calculated with a width and display block"); }); +test("box model properties incorrectly returning % instead of px, see #10639 and #12088", function() { + var container = jQuery("<div/>").width( 400 ).appendTo("#qunit-fixture"), + el = jQuery("<div/>").css({ "width": "50%", "marginRight": "50%" }).appendTo( container ), + el2 = jQuery("<div/>").css({ "width": "50%", "minWidth": "300px", "marginLeft": "25%" }).appendTo( container ); + + equal( el.css("marginRight"), "200px", "css('marginRight') returning % instead of px, see #10639" ); + equal( el2.css("marginLeft"), "100px", "css('marginLeft') returning incorrect pixel value, see #12088" ); +}); + test("jQuery.cssProps behavior, (bug #8402)", function() { var div = jQuery( "<div>" ).appendTo(document.body).css({ "position": "absolute", diff --git a/test/unit/dimensions.js b/test/unit/dimensions.js index 4c8cf5788..8b03b9ffc 100644 --- a/test/unit/dimensions.js +++ b/test/unit/dimensions.js @@ -292,13 +292,6 @@ 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( "getting dimensions of zero width/height table elements shouldn't alter dimensions", function() { expect( 1 ); |