Chromium Code Reviews| 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..f9c7839b2a48026cc7b680408dffb6b8e7ae9283 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"); |
| @@ -39,16 +40,14 @@ |
| layer.className = ''; |
| // Verify we now have a hit rect on the document after waiting a frame. |
|
majidvp
2017/01/03 18:22:14
nit: this comment is not longer accurate because w
Dan Elphick
2017/01/04 09:22:29
Done.
|
| - 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); |
| + runAfterLayoutAndPaint(function() { |
| + if (window.internals) { |
| + rects = window.internals.touchEventTargetLayerRects(document); |
| + shouldBe("rects.length", "1"); |
| + shouldBeEqualToString("rects[0].layerAssociatedNode.nodeName", "#document"); |
| + } |
| + finishJSTest(); |
| + }); |
| </script> |
| </body> |
| </html> |