Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / getComputedStyle / getComputedStyle-webkit-columns-shorthand.html
blobcaa21b6e7dad781d6333a121150469e971882891
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 -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);
41 </script>
42 </body>
43 </html>