4 <title>Test for WebKit bug
18294 : Strange Result for getComputedStyle on borderWidth set in em
</title>
5 <script src=
"../../resources/js-test.js"></script>
8 <p id=
"description">Test for WebKit bug
<a href=
"https://bugs.webkit.org/show_bug.cgi?id=18294">18294</a> : Strange Result for getComputedStyle on borderWidth set in em
</p>
9 <div id=
"console"></div>
11 <div id=
"tests_container">
13 <div id=
"test" style=
"border-style:solid;font-size:100px;"></div>
18 var test
= document
.getElementById("test");
20 test
.style
.borderWidth
= "120em 110em 100em 90.1em";
21 var computedStyle
= window
.getComputedStyle(test
, null);
22 shouldBe("computedStyle.getPropertyValue('border-width')", "'12000px 11000px 10000px 9010px'");
23 shouldBe("computedStyle.borderTopWidth","'12000px'");
24 shouldBe("computedStyle.borderRightWidth","'11000px'");
25 shouldBe("computedStyle.borderBottomWidth","'10000px'");
26 shouldBe("computedStyle.borderLeftWidth","'9010px'");
27 // clean up after ourselves
28 var tests_container
= document
.getElementById("tests_container");
29 tests_container
.parentNode
.removeChild(tests_container
);