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

Unified Diff: LayoutTests/animations/animation-controller-drt-api.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
« no previous file with comments | « no previous file | LayoutTests/animations/compositor-start-event-timing.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/animations/animation-controller-drt-api.html
diff --git a/LayoutTests/animations/animation-controller-drt-api.html b/LayoutTests/animations/animation-controller-drt-api.html
index d872cd3b3c0c1dbc4be37001b55778c13f36b4c9..846642f9225f7e9fe6dff284211d6f982d5f1397 100644
--- a/LayoutTests/animations/animation-controller-drt-api.html
+++ b/LayoutTests/animations/animation-controller-drt-api.html
@@ -16,7 +16,6 @@
width: 200px;
height: 200px;
background-color: red;
- -webkit-animation-name: anim1, anim2;
-webkit-animation-duration: 300ms, 300ms;
-webkit-animation-delay: 0s, 100ms;
-webkit-transition-property: top, width;
@@ -53,28 +52,28 @@
document.getElementById('result').innerHTML += "PASS: Number of active animations at " + time + "ms is (" + current + ") as expected<br>";
else
document.getElementById('result').innerHTML += "FAIL: Number of active animations at " + time + "ms is (" + current + ") but was expecting (" + expected + ")<br>";
- if (isLast)
+ if (isLast && window.testRunner)
testRunner.notifyDone();
}
-
- function startTest() {
- if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
-
- var target = document.getElementById('target');
- target.style.top = '200px';
- target.style.width = '100px';
-
- setTimeout(sample.bind(null, 0, 4, false), 0);
- setTimeout(sample.bind(null, 200, 4, false), 200);
- setTimeout(sample.bind(null, 500, 0, true), 500);
- }
+
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
}
+ requestAnimationFrame(function() {
+ var target = document.getElementById('target');
+ target.style.webkitAnimationName = 'anim1, anim2';
+ target.style.top = '200px';
+ target.style.width = '100px';
+
+ requestAnimationFrame(sample.bind(null, 0, 4, false));
+ setTimeout(sample.bind(null, 200, 4, false), 200);
+ setTimeout(sample.bind(null, 500, 0, true), 500);
+ });
</script>
</head>
-<body onload="startTest()">
+<body>
<h1>Test for DRT numberOfActiveAnimations() API</h1>
<div id="target"></div>
« no previous file with comments | « no previous file | LayoutTests/animations/compositor-start-event-timing.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698