Commit 618c14c5 authored by Bo Liu's avatar Bo Liu Committed by Commit Bot

weblayer: Maybe deflake TopControlsTest

By doubling the timeout for polling scroll.

Bug: 1035894
Change-Id: I6088799c8dd704965e9e9c571cdf4cb919ee745c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2050566
Commit-Queue: Bo <boliu@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#740390}
parent 517ac9fa
......@@ -76,6 +76,10 @@ public class TopControlsTest {
@Test
@SmallTest
public void testBasic() throws Exception {
// TODO(crbug.com/1035894): Depending on if flake is reduced, either remove this TODO or
// remove the longer timeout.
final long timeoutMs = 6000L;
final long checkIntervalMs = 100L;
final String url = UrlUtils.encodeHtmlDataUri("<body><p style='height:5000px'>");
InstrumentationActivity activity = mActivityTestRule.launchShellWithUrl(url);
......@@ -107,7 +111,7 @@ public class TopControlsTest {
public boolean isSatisfied() {
return mInitialVisiblePageHeight != getVisiblePageHeight();
}
});
}, timeoutMs, checkIntervalMs);
// Moving should also hide the top-controls View.
TestThreadUtils.runOnUiThreadBlocking(() -> {
......@@ -124,7 +128,7 @@ public class TopControlsTest {
public boolean isSatisfied() {
return mInitialVisiblePageHeight == getVisiblePageHeight();
}
});
}, timeoutMs, checkIntervalMs);
// top-controls are shown async.
CriteriaHelper.pollUiThread(new Criteria() {
......
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