From d5665e0d2217da5d329c04e83a25a044650956d5 Mon Sep 17 00:00:00 2001 From: Thomas Fuchs Date: Sun, 10 Jun 2007 12:58:32 +0000 Subject: [PATCH] Prototype: add failing unit test (IE) for Element.Methods.getStyle on auto-calculated widths. References #8564. --- test/unit/dom.html | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/test/unit/dom.html b/test/unit/dom.html index c242637..0f3eac4 100644 --- a/test/unit/dom.html +++ b/test/unit/dom.html @@ -14,6 +14,17 @@ #style_test_1 { cursor: pointer; font-size:12px;} div.style-test { margin-left: 1px } + #style_test_dimensions_container { + position: absolute; + top: 0; + left: 500px; + width: 20px; + height: 30px; + margin: 10px; + padding: 10px; + border: 3px solid red; + } + #not_floating_style { float: none } #floating_style { float: left } #op2 { opacity:0.5;filter:alpha(opacity=50)progid:DXImageTransform.Microsoft.Blur(strength=10);} @@ -205,7 +216,10 @@
blah
- +
+
+
+
@@ -979,10 +993,16 @@ assertEqual('alpha(opacity=0)', $('op3').getStyle('filter')); assertEqual(0.3, $('op4-ie').getStyle('opacity')); } - // verify that value is stil found when using camelized + // verify that value is still found when using camelized // strings (function previously used getPropertyValue() // which expected non-camelized strings) assertEqual("12px", $('style_test_1').getStyle('fontSize')); + + // getStyle on width/height should return values according to + // the CSS box-model, which doesn't include + // margins, paddings or borders + assertEqual("14px", $('style_test_dimensions').getStyle('width')); + assertEqual("17px", $('style_test_dimensions').getStyle('height')); }}, testElementGetOpacity: function() {with(this) {