5 <script src=
"../../../resources/js-test.js"></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
);