OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta charset="utf-8"> | 4 <meta charset="utf-8"> |
5 <script src="../../resources/js-test.js"></script> | 5 <script src="../../resources/js-test.js"></script> |
6 </head> | 6 </head> |
7 <body> | 7 <body> |
8 <script> | 8 <script> |
9 | 9 |
10 description("Test to make sure the box-decoration-break property is correctly pa
rsed.") | 10 description("Test to make sure the box-decoration-break property is correctly pa
rsed.") |
11 | 11 |
12 var testContainer = document.createElement("div"); | 12 var testContainer = document.createElement("div"); |
13 document.body.appendChild(testContainer); | 13 document.body.appendChild(testContainer); |
14 | 14 |
15 testContainer.innerHTML = '<p id="test">Hello world</p>'; | 15 testContainer.innerHTML = '<p id="test">Hello world</p>'; |
16 | 16 |
17 e = document.getElementById('test'); | 17 e = document.getElementById('test'); |
18 computedStyle = window.getComputedStyle(e, null); | 18 computedStyle = window.getComputedStyle(e, null); |
19 | 19 |
20 e.style.webkitBoxDecorationBreak = "slice"; | 20 e.style.webkitBoxDecorationBreak = "slice"; |
21 shouldBe("e.style.getPropertyValue('-webkit-box-decoration-break')", "'slice'"); | 21 shouldBe("e.style.getPropertyValue('-webkit-box-decoration-break')", "'slice'"); |
22 shouldBe("computedStyle.getPropertyValue('-webkit-box-decoration-break')", "'sli
ce'"); | 22 shouldBe("computedStyle.getPropertyValue('-webkit-box-decoration-break')", "'sli
ce'"); |
23 | 23 |
24 e.style.webkitBoxDecorationBreak = "clone"; | 24 e.style.webkitBoxDecorationBreak = "clone"; |
25 shouldBe("e.style.getPropertyValue('-webkit-box-decoration-break')", "'clone'"); | 25 shouldBe("e.style.getPropertyValue('-webkit-box-decoration-break')", "'clone'"); |
26 shouldBe("computedStyle.getPropertyValue('-webkit-box-decoration-break')", "'clo
ne'"); | 26 shouldBe("computedStyle.getPropertyValue('-webkit-box-decoration-break')", "'clo
ne'"); |
27 | 27 |
28 e.style.webkitBoxDecorationBreak = ""; | 28 e.style.webkitBoxDecorationBreak = ""; |
29 e.style.webkitBoxDecorationBreak = "invalid"; | 29 e.style.webkitBoxDecorationBreak = "invalid"; |
30 shouldBe("e.style.getPropertyValue('-webkit-box-decoration-break')", "null"); | 30 shouldBeEqualToString("e.style.getPropertyValue('-webkit-box-decoration-break')"
, ""); |
31 shouldBe("computedStyle.getPropertyValue('-webkit-box-decoration-break')", "'sli
ce'"); | 31 shouldBe("computedStyle.getPropertyValue('-webkit-box-decoration-break')", "'sli
ce'"); |
32 | 32 |
33 document.body.removeChild(testContainer); | 33 document.body.removeChild(testContainer); |
34 | 34 |
35 </script> | 35 </script> |
36 </body> | 36 </body> |
37 </html> | 37 </html> |
OLD | NEW |