Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / getComputedStyle / getComputedStyle-list-style-shorthand.html
blobdc35cbcd66fefffaa5e290b20ff4769d3f42a975
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <script src="../../../resources/js-test.js"></script>
6 </head>
7 <body>
8 <script>
10 description("Tests that the list-style shorthand is computed properly.")
12 var testContainer = document.createElement("div");
13 testContainer.contentEditable = true;
14 document.body.appendChild(testContainer);
16 testContainer.innerHTML = '<ul id="test"><li>Coffee</li><li>Tea</li><li>Coca Cola</li></ul>';
18 e = document.getElementById('test');
19 computedStyle = window.getComputedStyle(e, null);
21 e.style.listStyle = "circle outside url(dummy://test.png)";
22 shouldBe("computedStyle.getPropertyValue('list-style')", "'circle outside url(dummy://test.png)'");
24 e.style.listStyle = ""
25 e.style.listStyle = "a b c";
26 shouldBe("computedStyle.getPropertyValue('list-style')", "'disc outside none'");
28 e.style.listStyle = "circle outside";
29 shouldBe("computedStyle.getPropertyValue('list-style')", "'circle outside none'")
31 e.style.listStyle = "none";
32 shouldBe("computedStyle.getPropertyValue('list-style')", "'none outside none'")
34 e.style.listStyle = "";
35 e.style.listStyleType = "circle";
36 e.style.listStylePosition = "outside";
37 e.style.listStyleImage = "url(dummy://test.png)";
38 shouldBe("computedStyle.getPropertyValue('list-style')", "'circle outside url(dummy://test.png)'");
40 document.body.removeChild(testContainer);
42 </script>
43 </body>
44 </html>