Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / getComputedStyle / getComputedStyle-margin-shorthand.html
blob003f480f8cf644800eae3219c827cceb8f5bb0a6
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 margin shorthand is computed properly.")
12 var testContainer = document.createElement("div");
13 testContainer.contentEditable = true;
14 document.body.appendChild(testContainer);
16 testContainer.innerHTML = '<div style="width:100px;height:100px"><div id="test">hello</div></div>';
18 e = document.getElementById('test');
19 computedStyle = window.getComputedStyle(e, null);
21 e.style.margin = "10px 5px 4px 3px";
22 shouldBe("computedStyle.getPropertyValue('margin')", "'10px 5px 4px 3px'");
24 e.style.margin = "4em 5em 6em 7em";
25 shouldBe("computedStyle.getPropertyValue('margin')", "'64px 80px 96px 112px'");
27 e.style.margin = "5% 6% 7% 8%";
28 shouldBe("computedStyle.getPropertyValue('margin')", "'5px 6px 7px 8px'");
30 document.body.removeChild(testContainer);
32 </script>
33 </body>
34 </html>