Commit 65151967 authored by Yue Zhang's avatar Yue Zhang Committed by Commit Bot

Make enterTabSwitcher in TabUiTestHelper less flaky

Bug: 1019727
Change-Id: I4a07764eb71c4ff7f843602795e35d7262120c4d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1890393Reviewed-by: default avatarWei-Yin Chen (陳威尹) <wychen@chromium.org>
Commit-Queue: Yue Zhang <yuezhanggg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#711436}
parent d0781232
...@@ -59,7 +59,10 @@ public class TabUiTestHelper { ...@@ -59,7 +59,10 @@ public class TabUiTestHelper {
static void enterTabSwitcher(ChromeTabbedActivity cta) { static void enterTabSwitcher(ChromeTabbedActivity cta) {
OverviewModeBehaviorWatcher showWatcher = createOverviewShowWatcher(cta); OverviewModeBehaviorWatcher showWatcher = createOverviewShowWatcher(cta);
assertFalse(cta.getLayoutManager().overviewVisible()); assertFalse(cta.getLayoutManager().overviewVisible());
onView(withId(R.id.tab_switcher_button)).perform(click()); // TODO(crbug.com/1019727) Figure out a better way to wait until isCompletelyDisplayed() is
// true in espresso.
TestThreadUtils.runOnUiThreadBlocking(
() -> { cta.findViewById(R.id.tab_switcher_button).performClick(); });
showWatcher.waitForBehavior(); showWatcher.waitForBehavior();
} }
...@@ -171,4 +174,4 @@ public class TabUiTestHelper { ...@@ -171,4 +174,4 @@ public class TabUiTestHelper {
} }
} }
} }
} }
\ No newline at end of file
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