Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / css / getComputedStyle / getComputedStyle-column-rule.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-column-rule 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-column-rule: thin dotted black;">hello</div>';
17
18 e = document.getElementById('test');
19 computedStyle = window.getComputedStyle(e, null);
20
21 shouldBeEqualToString("computedStyle.getPropertyValue('-webkit-column-rule')", '1px dotted rgb(0, 0, 0)');
22
23 e.style.webkitColumnRule="10px red";
24 shouldBeEqualToString("computedStyle.getPropertyValue('-webkit-column-rule')", '0px none rgb(255, 0, 0)');
25
26 e.style.webkitColumnRuleWidth="medium"
27 e.style.webkitColumnRuleStyle="dashed"
28 shouldBeEqualToString("computedStyle.getPropertyValue('-webkit-column-rule')", '3px dashed rgb(255, 0, 0)');
29
30 e.style.webkitColumnRule="10px dotted blue"
31 e.style.webkitColumnRuleStyle="none";
32 shouldBeEqualToString("computedStyle.getPropertyValue('-webkit-column-rule')", '0px none rgb(0, 0, 255)');
33
34 e.style.webkitColumnRuleStyle="hidden";
35 shouldBeEqualToString("computedStyle.getPropertyValue('-webkit-column-rule')", '0px hidden rgb(0, 0, 255)');
36
37 document.body.removeChild(testContainer);
38
39 </script>
40 </body>
41 </html>