Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Unified Diff: LayoutTests/fast/regions/webkit-named-flow-event-auto-height.html

Issue 17176018: [CSS Regions] Add new regionOversetChange event (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/regions/webkit-named-flow-event-auto-height.html
diff --git a/LayoutTests/fast/regions/webkit-named-flow-event-auto-height.html b/LayoutTests/fast/regions/webkit-named-flow-event-auto-height.html
new file mode 100644
index 0000000000000000000000000000000000000000..e075a2adae498b63050ed459ef16bbe3219cbceb
--- /dev/null
+++ b/LayoutTests/fast/regions/webkit-named-flow-event-auto-height.html
@@ -0,0 +1,89 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<script src="../js/resources/js-test-pre.js"></script>
+<script src="resources/helper.js"></script>
+<style>
+ #article {
+ -webkit-flow-into: article;
+ border: 10px solid black;
+ }
+ #region_1, #region_2 {
+ -webkit-flow-from: no_article;
+ overflow:hidden;
apavlov 2013/06/21 15:43:06 We normally have a whitespace after ':' in propert
+ display:inline-block;
+ vertical-align:top;
+ margin:10px;
+ height:auto;
+ width:200px;
+ border: 1px solid red;
+ padding: 5px;
+ }
+ .content {
+ background-color: green;
+ border: 3px dashed blue;
+ }
+ #part1 {
+ height: 180px;
+ }
+ #part2 {
+ -webkit-region-break-before: always;
+ height: 160px;
+ }
+</style>
+</head>
+<body>
+ <div id="article">
+ <div>
+ <div id="part1" class="content"></div>
+ <div id="part2" class="content"></div>
+ </div>
+ </div>
+
+ <div id="region_1"></div>
+ <div id="region_2"></div>
+
+ <script>
+
+ description("Tests the regionOversetChange event for regions with height:auto");
+
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ }
+ window.jsTestIsAsync = true;
+ function flowContent(flowName) {
+ var region = document.getElementById("region_1");
+ region.style.webkitFlowFrom = flowName;
+ region = document.getElementById("region_2");
+ region.style.webkitFlowFrom = flowName;
+ }
+
+ var eventFiredCount = 0;
+ function finishTest() {
+ shouldBe("eventFiredCount", "1");
+ finishJSTest();
+ }
+
+ function regionOversetChanged(event) {
+ ++eventFiredCount;
apavlov 2013/06/21 15:43:06 Odd indentation
+ shouldBeEqualToString("event.target.name", "article");
+
+ // wait and make sure no other events arrive
apavlov 2013/06/21 15:43:06 // Comments should be full sentences. See [comment
+ setTimeout("finishTest()", 200);
+ }
+
+ function startTest() {
+ var flowThread = getFlowByName("article");
+ flowThread.addEventListener("webkitregionoversetchange", regionOversetChanged);
+
+ debug("Flowing content into regions...");
+ flowContent("article");
+ }
+
+ window.addEventListener("load", startTest);
+ </script>
+ <script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698