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

Unified Diff: third_party/WebKit/LayoutTests/animations/resources/composited-animation-test.js

Issue 2607853003: CSS Animations: Fix flaky composited-animations-simple.html (Closed)
Patch Set: Created 4 years 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 | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/animations/resources/composited-animation-test.js
diff --git a/third_party/WebKit/LayoutTests/animations/resources/composited-animation-test.js b/third_party/WebKit/LayoutTests/animations/resources/composited-animation-test.js
index dfdbd3a1294bf16649d065f16739f49c88fc02d3..3b5fc0020a4a13fc181186abe5d9fed89c3ed012 100644
--- a/third_party/WebKit/LayoutTests/animations/resources/composited-animation-test.js
+++ b/third_party/WebKit/LayoutTests/animations/resources/composited-animation-test.js
@@ -139,15 +139,21 @@ class CompositedAnimationTestCommon {
this.error.textContent += `${test.name}: ${message} `;
}
+ waitForCompositor() {
+ return this.error.animate({opacity: ['1', '1']}, 1).ready;
+ }
+
layoutAndPaint() {
if (window.testRunner)
testRunner.waitUntilDone();
- requestAnimationFrame(() => {
- if (window.internals)
- this.assertAnimationCompositedState();
- if (window.testRunner)
- testRunner.notifyDone();
+ this.waitForCompositor().then(() => {
+ requestAnimationFrame(() => {
+ if (window.internals)
+ this.assertAnimationCompositedState();
+ if (window.testRunner)
+ testRunner.notifyDone();
+ });
});
}
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698