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

Unified Diff: third_party/WebKit/LayoutTests/fast/events/touch/touch-rect-crash-on-unpromote-layer.html

Issue 2609923002: Use runAfterLayoutAndPaint instead of requestAnimationFrame and (Closed)
Patch Set: Created 3 years, 12 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698