OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE HTML> | |
2 <html> | |
rune
2014/09/17 11:32:57
No need to include html, head or body elements.
Kyungtae Kim
2014/09/18 12:50:07
Done.
| |
3 <head> | |
4 <script src="../../resources/js-test.js"></script> | |
5 <script type="text/javascript"> | |
rune
2014/09/17 11:32:56
Drop the type attribute.
Kyungtae Kim
2014/09/18 12:50:06
Done.
| |
6 function test() | |
7 { | |
8 if (!window.testRunner) | |
rune
2014/09/17 11:32:57
There nothing below relying on testRunner below af
Kyungtae Kim
2014/09/18 12:50:06
Done.
| |
9 return; | |
10 absolute_with_left_right = document.getElementById("absolute_with_le ft_right"); | |
11 shouldBe("absolute_with_left_right.getBoundingClientRect().width","0 "); | |
12 shouldBe("absolute_with_left_right.getClientRects()[0].width","0"); | |
13 shouldBe("absolute_with_left_right.offsetWidth","0"); | |
14 absolute_with_negative_width = document.getElementById("absolute_wit h_negative_width"); | |
15 shouldBe("absolute_with_negative_width.getBoundingClientRect().width ","0"); | |
16 shouldBe("absolute_with_negative_width.getClientRects()[0].width","0 "); | |
17 shouldBe("absolute_with_negative_width.offsetWidth","0"); | |
18 } | |
19 </script> | |
20 </head> | |
21 <body onLoad="test()"> | |
rune
2014/09/17 11:32:57
Why does this test need to wait for the onload eve
Kyungtae Kim
2014/09/18 12:50:07
Done.
| |
22 <div style="position: relative; width: 0px"> | |
23 <div style="position: absolute; left: 1px; right: 1px;" id="absolute_wit h_left_right"></div> | |
24 <div style="position: absolute; left: 1px; right: 1px; width:-10px" id=" absolute_with_negative_width"></div> | |
rune
2014/09/17 11:32:56
This element and corresponding tests don't add any
Kyungtae Kim
2014/09/18 12:50:07
Done.
| |
25 </div> | |
26 </body> | |
27 </html> | |
28 | |
OLD | NEW |