| Index: third_party/WebKit/LayoutTests/fast/events/touch/touch-rect-crash-on-unpromote-layer.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/events/touch/touch-rect-crash-on-unpromote-layer.html b/third_party/WebKit/LayoutTests/fast/events/touch/touch-rect-crash-on-unpromote-layer.html
|
| index 3779f3cda128cf0a7ad687050714352ce469a51b..a9926ceb75066d395dfc448007dad44ab09aa0a0 100644
|
| --- a/third_party/WebKit/LayoutTests/fast/events/touch/touch-rect-crash-on-unpromote-layer.html
|
| +++ b/third_party/WebKit/LayoutTests/fast/events/touch/touch-rect-crash-on-unpromote-layer.html
|
| @@ -18,6 +18,7 @@
|
| <div id="console"></div>
|
|
|
| <script src="../../../resources/js-test.js"></script>
|
| +<script src="../../../resources/run-after-layout-and-paint.js"></script>
|
| <script>
|
| jsTestIsAsync = true;
|
| description("Make sure we don't crash when a layer with a touch event handler becomes non-composited");
|
| @@ -38,17 +39,15 @@
|
| // Make the layer non-composited
|
| layer.className = '';
|
|
|
| - // Verify we now have a hit rect on the document after waiting a frame.
|
| - setTimeout(function() {
|
| - window.requestAnimationFrame(function() {
|
| - if (window.internals) {
|
| - rects = window.internals.touchEventTargetLayerRects(document);
|
| - shouldBe("rects.length", "1");
|
| - shouldBeEqualToString("rects[0].layerAssociatedNode.nodeName", "#document");
|
| - }
|
| - finishJSTest();
|
| - });
|
| - }, 0);
|
| + // Verify we now have a hit rect on the document after layout and paint.
|
| + runAfterLayoutAndPaint(function() {
|
| + if (window.internals) {
|
| + rects = window.internals.touchEventTargetLayerRects(document);
|
| + shouldBe("rects.length", "1");
|
| + shouldBeEqualToString("rects[0].layerAssociatedNode.nodeName", "#document");
|
| + }
|
| + finishJSTest();
|
| + });
|
| </script>
|
| </body>
|
| </html>
|
|
|