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

Unified Diff: LayoutTests/animations/compositor-start-event-timing.html

Issue 135693003: Defer starting of animations until after compositing update (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reland after fixing flaky tests. Created 6 years, 10 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/animations/compositor-start-event-timing.html
diff --git a/LayoutTests/animations/compositor-start-event-timing.html b/LayoutTests/animations/compositor-start-event-timing.html
index 4c26a2861ab72e7de67560eb32076b21ce3646d8..fad8325eb2fe4d2493cc81505f3caced882a4224 100644
--- a/LayoutTests/animations/compositor-start-event-timing.html
+++ b/LayoutTests/animations/compositor-start-event-timing.html
@@ -23,11 +23,13 @@ if (window.testRunner) {
});
}
document.body.textContent = 'FAIL (expected if outside the virtual/threaded suite)';
-document.body.classList.add('start');
-document.body.offsetTop;
-setTimeout(function() {
- document.body.addEventListener('webkitAnimationStart', function() {
- document.body.textContent = 'PASS';
- });
-}, 0);
+requestAnimationFrame(function() {
+ document.body.classList.add('start');
+ document.body.offsetTop;
+ setTimeout(function() {
+ document.body.addEventListener('webkitAnimationStart', function() {
+ document.body.textContent = 'PASS';
+ });
+ }, 0);
+});
</script>
« no previous file with comments | « LayoutTests/animations/animation-controller-drt-api.html ('k') | LayoutTests/transitions/webkit-clip-path-equality.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698