5 <script src=
"../../../resources/js-test.js"></script>
10 description("Tests that the -webkit-columns shorthand is computed properly.")
12 var testContainer
= document
.createElement("div");
13 testContainer
.contentEditable
= true;
14 document
.body
.appendChild(testContainer
);
16 testContainer
.innerHTML
= '<div id="test" style="-webkit-columns: 10px 2;">hello</div>';
18 e
= document
.getElementById('test');
19 computedStyle
= window
.getComputedStyle(e
, null);
21 shouldBeEqualToString("computedStyle.getPropertyValue('-webkit-columns')", '10px 2');
23 e
.style
.webkitColumns
="10px";
24 shouldBeEqualToString("computedStyle.getPropertyValue('-webkit-columns')", '10px auto');
26 e
.style
.webkitColumns
=""
27 e
.style
.webkitColumnCount
="2"
28 shouldBeEqualToString("computedStyle.getPropertyValue('-webkit-columns')", 'auto 2');
30 e
.style
.webkitColumns
="auto 2"
31 shouldBeEqualToString("computedStyle.getPropertyValue('-webkit-columns')", 'auto 2');
33 e
.style
.webkitColumnCount
="auto";
34 shouldBeEqualToString("computedStyle.getPropertyValue('-webkit-columns')", 'auto auto');
36 e
.style
.webkitColumnWidth
="10px";
37 shouldBeEqualToString("computedStyle.getPropertyValue('-webkit-columns')", '10px auto');
39 document
.body
.removeChild(testContainer
);