Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / css / getComputedStyle / getComputedStyle-webkit-columns-shorthand.html
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>
9
10 description("Tests that the -webkit-columns shorthand is computed properly.")
11
12 var testContainer = document.createElement("div");
13 testContainer.contentEditable = true;
14 document.body.appendChild(testContainer);
15
16 testContainer.innerHTML = '<div id="test" style="-webkit-columns: 10px 2;">hello</div>';
17
18 e = document.getElementById('test');
19 computedStyle = window.getComputedStyle(e, null);
20
21 shouldBeEqualToString("computedStyle.getPropertyValue('-webkit-columns')", '10px 2');
22
23 e.style.webkitColumns="10px";
24 shouldBeEqualToString("computedStyle.getPropertyValue('-webkit-columns')", '10px auto');
25
26 e.style.webkitColumns=""
27 e.style.webkitColumnCount="2"
28 shouldBeEqualToString("computedStyle.getPropertyValue('-webkit-columns')", 'auto 2');
29
30 e.style.webkitColumns="auto 2"
31 shouldBeEqualToString("computedStyle.getPropertyValue('-webkit-columns')", 'auto 2');
32
33 e.style.webkitColumnCount="auto";
34 shouldBeEqualToString("computedStyle.getPropertyValue('-webkit-columns')", 'auto auto');
35
36 e.style.webkitColumnWidth="10px";
37 shouldBeEqualToString("computedStyle.getPropertyValue('-webkit-columns')", '10px auto');
38
39 document.body.removeChild(testContainer);
40
41 </script>
42 </body>
43 </html>