| 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");
|
|
|