Commit dfec8a9d authored by Eric Willigers's avatar Eric Willigers Committed by Commit Bot

Fix flaky zoom-responsive-transform-animation.html

We ensure the new zoom factor has been processed by the compositor,
using requestAnimationFrame and a finished promise.

BUG=743009

Change-Id: I5d6b97333d170ceaa6bcd29db3e84446ef59d18b
Reviewed-on: https://chromium-review.googlesource.com/575729Reviewed-by: default avatarnainar <nainar@chromium.org>
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487369}
parent d8c963df
...@@ -53,7 +53,7 @@ if (window.testRunner) ...@@ -53,7 +53,7 @@ if (window.testRunner)
testRunner.waitUntilDone(); testRunner.waitUntilDone();
function waitForCompositor() { function waitForCompositor() {
return footer.animate({opacity: ['1', '1']}, 1).ready; return footer.animate({opacity: ['1', '1']}, 1).finished;
} }
requestAnimationFrame(() => { requestAnimationFrame(() => {
......
...@@ -50,16 +50,18 @@ if (window.testRunner) ...@@ -50,16 +50,18 @@ if (window.testRunner)
testRunner.waitUntilDone(); testRunner.waitUntilDone();
function waitForCompositor() { function waitForCompositor() {
return footer.animate({opacity: ['1', '1']}, 1).ready; return footer.animate({opacity: ['1', '1']}, 1).finished;
} }
requestAnimationFrame(() => { requestAnimationFrame(() => {
requestAnimationFrame(() => { requestAnimationFrame(() => {
internals.setZoomFactor(2); internals.setZoomFactor(2);
requestAnimationFrame(() => { requestAnimationFrame(() => {
waitForCompositor().then(() => { requestAnimationFrame(() => {
if (window.testRunner) waitForCompositor().then(() => {
testRunner.notifyDone(); if (window.testRunner)
testRunner.notifyDone();
});
}); });
}); });
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment