Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / css / getComputedStyle / getComputedStyle-outline-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 outline 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 style="width:100px;height:100px"><div id="test">hello</div></div>';
17
18 e = document.getElementById('test');
19 computedStyle = window.getComputedStyle(e, null);
20
21 e.style.outline = "thick solid red";
22 shouldBe("computedStyle.getPropertyValue('outline')", "'rgb(255, 0, 0) solid 5px'");
23
24 e.style.outline = "2em solid";
25 shouldBe("computedStyle.getPropertyValue('outline')", "'rgb(0, 0, 0) solid 32px'");
26
27 e.style.outline = "4px none red";
28 shouldBe("computedStyle.getPropertyValue('outline')", "'rgb(255, 0, 0) none 0px'");
29
30 document.body.removeChild(testContainer);
31
32 </script>
33 </body>
34 </html>