| Index: third_party/WebKit/LayoutTests/css3/flexbox/display-flexbox-set-get.html
|
| diff --git a/third_party/WebKit/LayoutTests/css3/flexbox/display-flexbox-set-get.html b/third_party/WebKit/LayoutTests/css3/flexbox/display-flexbox-set-get.html
|
| index 0daa7828bf114d33531d223c942ffd273479b36e..69f47f4ae8603779d9fbb55a61b0b08c7b23a796 100644
|
| --- a/third_party/WebKit/LayoutTests/css3/flexbox/display-flexbox-set-get.html
|
| +++ b/third_party/WebKit/LayoutTests/css3/flexbox/display-flexbox-set-get.html
|
| @@ -2,37 +2,41 @@
|
| <html>
|
| <head>
|
| <link href="resources/flexbox.css" rel="stylesheet">
|
| -<script src="../../resources/js-test.js"></script>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| </head>
|
| <body>
|
| +<p>Test that setting and getting display: flex and inline-flex works as expected</p>
|
| +<div id="log"></div>
|
| <div class="flexbox" id="flexbox"></div>
|
| <div class="inline-flexbox" id="flexboxInline"></div>
|
| <script>
|
| -description('Test that setting and getting display: flex and inline-flex works as expected');
|
|
|
| -debug("Test getting |display| set through CSS");
|
| +test(function() {
|
| var flexboxElement = document.getElementById("flexbox");
|
| -shouldBe("getComputedStyle(flexboxElement, '').getPropertyValue('display')", "'flex'");
|
| +assert_equals(getComputedStyle(flexboxElement, '').getPropertyValue('display'), 'flex');
|
| var inlineFlexboxElement = document.getElementById("flexboxInline");
|
| -shouldBe("getComputedStyle(inlineFlexboxElement, '').getPropertyValue('display')", "'inline-flex'");
|
| +assert_equals(getComputedStyle(inlineFlexboxElement, '').getPropertyValue('display'), 'inline-flex');
|
| +}, "Test getting |display| set through CSS");
|
|
|
| -debug("");
|
| -debug("Test getting and setting display through JS");
|
| +test(function() {
|
| var element = document.createElement("div");
|
| document.body.appendChild(element);
|
| -shouldBe("getComputedStyle(element, '').getPropertyValue('display')", "'block'");
|
| +assert_equals(getComputedStyle(element, '').getPropertyValue('display'), 'block');
|
| element.style.display = "flex";
|
| -shouldBe("getComputedStyle(element, '').getPropertyValue('display')", "'flex'");
|
| +assert_equals(getComputedStyle(element, '').getPropertyValue('display'), 'flex');
|
|
|
| element = document.createElement("div");
|
| document.body.appendChild(element);
|
| -shouldBe("getComputedStyle(element, '').getPropertyValue('display')", "'block'");
|
| +assert_equals(getComputedStyle(element, '').getPropertyValue('display'), 'block');
|
| element.style.display = "inline-flex";
|
| -shouldBe("getComputedStyle(element, '').getPropertyValue('display')", "'inline-flex'");
|
| +assert_equals(getComputedStyle(element, '').getPropertyValue('display'), 'inline-flex');
|
| element.style.display = "-webkit-flex";
|
| -shouldBe("getComputedStyle(element, '').getPropertyValue('display')", "'flex'");
|
| +assert_equals(getComputedStyle(element, '').getPropertyValue('display'), 'flex');
|
| element.style.display = "-webkit-inline-flex";
|
| -shouldBe("getComputedStyle(element, '').getPropertyValue('display')", "'inline-flex'");
|
| +assert_equals(getComputedStyle(element, '').getPropertyValue('display'), 'inline-flex');
|
| +
|
| +}, "Test getting and setting display through JS");
|
| </script>
|
| </body>
|
| </html>
|
|
|