Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / getPropertyValue-webkit-margin-collapse.html
blob0831bb784c5b41224e47b6eb2e93a140c8e26ea5
1 <!DOCTYPE HTML>
2 </html>
3 <head>
4 <title>-webkit-margin-collapse shorthand getPropertyValue test</title>
5 <style>
6 .test {
7 display: inline-block;
8 width: 5em;
9 height: 10em;
11 </style>
12 <script src="../../resources/js-test.js"></script>
13 <script>
14 if (window.testRunner)
15 testRunner.dumpAsText();
16 </script>
17 </head>
18 <body>
19 <div id="margin-collapse1" class="test" style="-webkit-margin-collapse: collapse separate;"></div>
20 <div id="margin-collapse2" class="test" style="-webkit-margin-collapse: discard;"></div>
21 <div id="margin-collapse3" class="test" style="-webkit-margin-before-collapse: discard; -webkit-margin-after-collapse: separate;"></div>
22 <div id="margin-collapse4" class="test" style="-webkit-margin-collapse: foo;"></div>
23 <div id="margin-collapse5" class="test" style="-webkit-margin-before-collapse: collapse;"></div>
24 <script>
25 description("<a href=\"https://bugs.webkit.org/show_bug.cgi?id=110903\">Bug 110903: getPropertyValue for -webkit-margin-collapse returns null, should compute the shorthand value</a>");
27 function webkitMarginCollapseValue(id) {
28 var element = document.getElementById(id);
29 return element.style.getPropertyValue("-webkit-margin-collapse");
32 shouldBe('webkitMarginCollapseValue("margin-collapse1")', "'collapse separate'");
33 shouldBe('webkitMarginCollapseValue("margin-collapse2")', "'discard discard'");
34 shouldBe('webkitMarginCollapseValue("margin-collapse3")', "'discard separate'");
35 debug("NOTE: 'foo' is an illegal CSS value for '-webkit-margin-collapse'.");
36 shouldBeEqualToString('webkitMarginCollapseValue("margin-collapse4")', "");
37 debug("NOTE: If only few longhand properties are specified, getPropertyValue for shorthand property returns empty string.")
38 shouldBeEqualToString('webkitMarginCollapseValue("margin-collapse5")', "");
39 </script>
40 </body>
41 </html>