Commit adc4e84b authored by chaopeng's avatar chaopeng Committed by Commit Bot

Call rAFs before checking the pinch zoom result

This test failing because it need some rAFs for commit.

Bug: 875097
Change-Id: I10aacf4a55ea8fe277fef1fc68b4d6c9ee287190
Reviewed-on: https://chromium-review.googlesource.com/1213545Reviewed-by: default avatarDavid Bokan <bokan@chromium.org>
Commit-Queue: Jianpeng Chao <chaopeng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589562}
parent d7939507
...@@ -18,6 +18,7 @@ function runTest(t, testCase) { ...@@ -18,6 +18,7 @@ function runTest(t, testCase) {
waitForCompositorCommit().then(t.step_func(() => { waitForCompositorCommit().then(t.step_func(() => {
chrome.gpuBenchmarking.pinchBy( chrome.gpuBenchmarking.pinchBy(
testCase.scale, centerX, centerY, t.step_func(() => { testCase.scale, centerX, centerY, t.step_func(() => {
waitForCompositorCommit().then(t.step_func(() => {
const expectedScale = testCase.startingScale * testCase.scale; const expectedScale = testCase.startingScale * testCase.scale;
assert_approx_equals( assert_approx_equals(
window.visualViewport.scale, window.visualViewport.scale,
...@@ -35,6 +36,7 @@ function runTest(t, testCase) { ...@@ -35,6 +36,7 @@ function runTest(t, testCase) {
kOffsetEpsilon, kOffsetEpsilon,
testCase.msg + " has correct visual viewport offsetTop."); testCase.msg + " has correct visual viewport offsetTop.");
resolve(); resolve();
}))
}), testCase.speed, testCase.gestureSource); }), testCase.speed, testCase.gestureSource);
})); }));
})); }));
......
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