Commit ba8f9cdc authored by Changwan Ryu's avatar Changwan Ryu Committed by Commit Bot

Deflake AwImeTest

When you click a node, it takes some time before the node can be
focused. This was not properly considered and caused the flakiness.

Test: tried 100+ times on Pixel 2 XL. 50% flakiness --> 0%.
Bug: 990209
Change-Id: I6e209495931b51381c04230cd49ac080674206fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1880371Reviewed-by: default avatarBo <boliu@chromium.org>
Reviewed-by: default avatarShimi Zhang <ctzsm@chromium.org>
Commit-Queue: Changwan Ryu <changwan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709959}
parent 1d61f890
......@@ -254,10 +254,8 @@ public class AwImeTest {
}
// https://crbug.com/920061
// Flaky! - https://crbug.com/990208
@Test
@SmallTest
@DisabledTest
public void testFocusAndViewSizeChangeCausesScroll() throws Throwable {
loadBottomInputHtml();
Rect currentRect = new Rect();
......@@ -279,6 +277,9 @@ public class AwImeTest {
DOMUtils.clickNode(webContents, "input_text", true /* goThroughAndroidRootView */,
false /* shouldScrollIntoView */);
CriteriaHelper.pollInstrumentationThread(
() -> "input_text".equals(DOMUtils.getFocusedNode(webContents)));
TestThreadUtils.runOnUiThreadBlocking(() -> {
// Expect that we may have a size change.
ImeAdapter imeAdapter = ImeAdapter.fromWebContents(mTestContainerView.getWebContents());
......
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