https://bugs.webkit.org/show_bug.cgi?id=72318
Reviewed by Tony Chang.
Test that covers the change for bug 72296 and also increase our flexbox coverage.
* css3/flexbox/display-flexbox-set-get-expected.txt: Added.
* css3/flexbox/display-flexbox-set-get.html: Added.
* css3/flexbox/resources/display-flexbox-set-get.js: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@100211
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-11-14 Julien Chaffraix <jchaffraix@webkit.org>
+
+ Test getting / setting display: -webkit-flexbox and -webkit-flexbox-inline
+ https://bugs.webkit.org/show_bug.cgi?id=72318
+
+ Reviewed by Tony Chang.
+
+ Test that covers the change for bug 72296 and also increase our flexbox coverage.
+
+ * css3/flexbox/display-flexbox-set-get-expected.txt: Added.
+ * css3/flexbox/display-flexbox-set-get.html: Added.
+ * css3/flexbox/resources/display-flexbox-set-get.js: Added.
+
2011-11-14 Adam Barth <abarth@webkit.org>
Cross-origin drag-and-drop prevention ineffective
--- /dev/null
+Test that setting and getting display: -webkit-flexbox and -webkit-inline-flexbox works as expected
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Test getting |display| set through CSS
+PASS getComputedStyle(flexboxElement, '').getPropertyValue('display') is '-webkit-flexbox'
+PASS getComputedStyle(inlineFlexboxElement, '').getPropertyValue('display') is '-webkit-inline-flexbox'
+
+Test getting and setting display through JS
+PASS getComputedStyle(element, '').getPropertyValue('display') is 'block'
+PASS getComputedStyle(element, '').getPropertyValue('display') is '-webkit-flexbox'
+PASS getComputedStyle(element, '').getPropertyValue('display') is 'block'
+PASS getComputedStyle(element, '').getPropertyValue('display') is '-webkit-inline-flexbox'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<style>
+.flexbox { display: -webkit-flexbox; }
+.flexboxInline { display: -webkit-inline-flexbox; }
+</style>
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<div class="flexbox" id="flexbox"></div>
+<div class="flexboxInline" id="flexboxInline"></div>
+<script src="resources/display-flexbox-set-get.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
--- /dev/null
+description('Test that setting and getting display: -webkit-flexbox and -webkit-inline-flexbox works as expected');
+
+debug("Test getting |display| set through CSS");
+var flexboxElement = document.getElementById("flexbox");
+shouldBe("getComputedStyle(flexboxElement, '').getPropertyValue('display')", "'-webkit-flexbox'");
+var inlineFlexboxElement = document.getElementById("flexboxInline");
+shouldBe("getComputedStyle(inlineFlexboxElement, '').getPropertyValue('display')", "'-webkit-inline-flexbox'");
+
+debug("");
+debug("Test getting and setting display through JS");
+var element = document.createElement("div");
+document.body.appendChild(element);
+shouldBe("getComputedStyle(element, '').getPropertyValue('display')", "'block'");
+element.style.display = "-webkit-flexbox";
+shouldBe("getComputedStyle(element, '').getPropertyValue('display')", "'-webkit-flexbox'");
+
+element = document.createElement("div");
+document.body.appendChild(element);
+shouldBe("getComputedStyle(element, '').getPropertyValue('display')", "'block'");
+element.style.display = "-webkit-inline-flexbox";
+shouldBe("getComputedStyle(element, '').getPropertyValue('display')", "'-webkit-inline-flexbox'");