OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>Test for WebKit bug 18294 : Strange Result for getComputedStyle on border
Width set in em</title> | 4 <title>Test for WebKit bug 18294 : Strange Result for getComputedStyle on border
Width set in em</title> |
5 <script src="../js/resources/js-test-pre.js"></script> | 5 <script src="../../resources/js-test.js"></script> |
6 </head> | 6 </head> |
7 <body> | 7 <body> |
8 <p id="description">Test for WebKit bug <a href="https://bugs.webkit.org/show_bu
g.cgi?id=18294">18294</a> : Strange Result for getComputedStyle on borderWidth s
et in em</p> | 8 <p id="description">Test for WebKit bug <a href="https://bugs.webkit.org/show_bu
g.cgi?id=18294">18294</a> : Strange Result for getComputedStyle on borderWidth s
et in em</p> |
9 <div id="console"></div> | 9 <div id="console"></div> |
10 | 10 |
11 <div id="tests_container"> | 11 <div id="tests_container"> |
12 | 12 |
13 <div id="test" style="border-style:solid;font-size:100px;"></div> | 13 <div id="test" style="border-style:solid;font-size:100px;"></div> |
14 | 14 |
15 </div> | 15 </div> |
16 | 16 |
17 <script> | 17 <script> |
18 var test = document.getElementById("test"); | 18 var test = document.getElementById("test"); |
19 | 19 |
20 test.style.borderWidth = "120em 110em 100em 90.1em"; | 20 test.style.borderWidth = "120em 110em 100em 90.1em"; |
21 var computedStyle = window.getComputedStyle(test, null); | 21 var computedStyle = window.getComputedStyle(test, null); |
22 shouldBe("computedStyle.getPropertyValue('border-width')", "'12000px 11000px
10000px 9010px'"); | 22 shouldBe("computedStyle.getPropertyValue('border-width')", "'12000px 11000px
10000px 9010px'"); |
23 shouldBe("computedStyle.getPropertyCSSValue('border-top-width').cssText","'1
2000px'"); | 23 shouldBe("computedStyle.getPropertyCSSValue('border-top-width').cssText","'1
2000px'"); |
24 shouldBe("computedStyle.getPropertyCSSValue('border-right-width').cssText","
'11000px'"); | 24 shouldBe("computedStyle.getPropertyCSSValue('border-right-width').cssText","
'11000px'"); |
25 shouldBe("computedStyle.getPropertyCSSValue('border-bottom-width').cssText",
"'10000px'"); | 25 shouldBe("computedStyle.getPropertyCSSValue('border-bottom-width').cssText",
"'10000px'"); |
26 shouldBe("computedStyle.getPropertyCSSValue('border-left-width').cssText","'
9010px'"); | 26 shouldBe("computedStyle.getPropertyCSSValue('border-left-width').cssText","'
9010px'"); |
27 // clean up after ourselves | 27 // clean up after ourselves |
28 var tests_container = document.getElementById("tests_container"); | 28 var tests_container = document.getElementById("tests_container"); |
29 tests_container.parentNode.removeChild(tests_container); | 29 tests_container.parentNode.removeChild(tests_container); |
30 </script> | 30 </script> |
31 </body> | 31 </body> |
32 </html> | 32 </html> |
OLD | NEW |