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

Unified Diff: LayoutTests/fast/regions/webkit-named-flow-event-add-to-flow.html

Issue 17176018: [CSS Regions] Add new regionOversetChange event (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Integrated styling fixes 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-add-to-flow.html
diff --git a/LayoutTests/fast/regions/webkit-named-flow-event-add-to-flow.html b/LayoutTests/fast/regions/webkit-named-flow-event-add-to-flow.html
index facdc27b49d2c62cdf94c3e5a3f1f51e9afa2a71..c6b2d25d817e593bcd163abb5045c61b2cf9d3c9 100644
--- a/LayoutTests/fast/regions/webkit-named-flow-event-add-to-flow.html
+++ b/LayoutTests/fast/regions/webkit-named-flow-event-add-to-flow.html
@@ -17,7 +17,7 @@
.block {
display:block;
}
-#region_1, #region_2 { height:110px; width:200px; margin: 5px;}
+#region_1, #region_2 { height:110px; width:200px; margin: 5px; border: 1px solid red;}
</style>
</head>
<body>
@@ -34,7 +34,7 @@
<div id="console" class="block"></div>
<script>
- description("Tests regionLayoutEvent")
+ description("Tests regionOversetChange event")
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
@@ -44,16 +44,19 @@
var r = document.getElementById(region);
r.style.webkitFlowFrom = flowName;
}
-
- var count = 0;
- function regionLayoutUpdated(event) {
+
+ var eventCount = 0;
+ function finishTest() {
+ shouldBe("eventCount", "2");
+ finishJSTest();
+ }
+
+ function regionOversetChanged(event) {
shouldBeEqualToString("event.target.name", "article");
- if (++count > 1) {
- event.target.removeEventListener("webkitregionlayoutupdate", regionLayoutUpdated);
-
+ if (++eventCount > 1) {
// this should be reached after region_2 is added to flow
- finishJSTest();
+ finishTest();
return;
}
@@ -62,7 +65,7 @@
function startTest() {
var flow = getFlowByName("article");
- flow.addEventListener("webkitregionlayoutupdate", regionLayoutUpdated);
+ flow.addEventListener("webkitregionoversetchange", regionOversetChanged);
debug("Flow content");
flowContent("region_1", "article");

Powered by Google App Engine
This is Rietveld 408576698