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

Unified Diff: LayoutTests/svg/repaint/image-with-clip-path.svg

Issue 615033002: Refactor of various layout tests to use RAF (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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/svg/repaint/image-with-clip-path.svg
diff --git a/LayoutTests/svg/repaint/image-with-clip-path.svg b/LayoutTests/svg/repaint/image-with-clip-path.svg
index b801db7e7a35600d8865f857710fb62a2df9de55..ea6a16895e3fb5a9c8c1660275875eee171308ab 100644
--- a/LayoutTests/svg/repaint/image-with-clip-path.svg
+++ b/LayoutTests/svg/repaint/image-with-clip-path.svg
@@ -31,12 +31,17 @@
}
function nextStep() {
- i.onload = function() { setTimeout(finishTest, 0); };
+ i.onload = function() { requestAnimationFrame(finishTest); };
update(200, 50, green);
}
function repaintTest() {
- i.onload = function() { setTimeout(nextStep, 0); };
+ // Nested RAF to ensure enough time elapsed for repaint logging to occur
+ i.onload = function() {
+ requestAnimationFrame(function() {
+ requestAnimationFrame(nextStep);
+ });
+ };
update(50, 100, red);
}
</script>

Powered by Google App Engine
This is Rietveld 408576698