Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / getComputedStyle / getComputedStyle-border-shorthand.html
blob7e86447985802dacb1235daeb2a23cb03d3889ce
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 border shorthands are computed properly.")
12 var testContainer = document.createElement("div");
13 testContainer.contentEditable = true;
14 document.body.appendChild(testContainer);
16 testContainer.innerHTML = '<div id="test">hello</div>';
18 e = document.getElementById('test');
19 computedStyle = window.getComputedStyle(e, null);
21 var properties = new Array("border-bottom","border-top","border-right", "border-left");
23 for (i = 0; i < properties.length; ++i) {
24 e.style.cssText = properties[i] + ": 10px solid red;";
25 shouldBe("computedStyle.getPropertyValue('" + properties[i] + "')", "'10px solid rgb(255, 0, 0)'");
27 e.style.cssText = properties[i] + ": 20em solid blue;";
28 shouldBe("computedStyle.getPropertyValue('" + properties[i] + "')", "'320px solid rgb(0, 0, 255)'");
30 e.style.cssText = properties[i] + ": 10px none green;";
31 shouldBe("computedStyle.getPropertyValue('" + properties[i] + "')", "'0px none rgb(0, 128, 0)'");
34 e.style.cssText = "";
35 e.style.border = "20em solid red";
36 shouldBe("computedStyle.getPropertyValue('border')", "'320px solid rgb(255, 0, 0)'");
38 e.style.border = "20em solid red";
39 e.style.borderTop = "10px groove blue";
40 shouldBe("computedStyle.getPropertyValue('border')", "''");
43 document.body.removeChild(testContainer);
45 </script>
46 </body>
47 </html>