Commit 7ebe9a83 authored by Alice Wang's avatar Alice Wang Committed by Commit Bot

[Android][Test] Remove waitForIdleSync() in account picker tests

This CL removes the waitForIdleSync() usage in
AccountPickerBottomSheetTest as the method is no longer allowed in the
current code.

Bug: 1121536
Change-Id: Id27878f02c1e4fb4f6324cd3e7abf3c0d26204d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2489522Reviewed-by: default avatarTanmoy Mollik <triploblastic@chromium.org>
Commit-Queue: Alice Wang <aliceywang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#819935}
parent 68142560
......@@ -26,7 +26,6 @@ import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.verify;
import static org.mockito.MockitoAnnotations.initMocks;
import android.support.test.InstrumentationRegistry;
import android.view.View;
import androidx.test.espresso.ViewInteraction;
......@@ -270,7 +269,11 @@ public class AccountPickerBottomSheetTest {
buildAndShowCollapsedBottomSheet();
mAccountManagerTestRule.removeAccountAndWaitForSeeding(PROFILE_DATA1.getAccountName());
mAccountManagerTestRule.removeAccountAndWaitForSeeding(PROFILE_DATA2.getAccountName());
InstrumentationRegistry.getInstrumentation().waitForIdleSync();
CriteriaHelper.pollUiThread(() -> {
return !mCoordinator.getBottomSheetViewForTesting()
.findViewById(R.id.account_picker_selected_account)
.isShown();
});
checkZeroAccountBottomSheet();
}
......@@ -280,7 +283,11 @@ public class AccountPickerBottomSheetTest {
buildAndShowExpandedBottomSheet();
mAccountManagerTestRule.removeAccountAndWaitForSeeding(PROFILE_DATA1.getAccountName());
mAccountManagerTestRule.removeAccountAndWaitForSeeding(PROFILE_DATA2.getAccountName());
InstrumentationRegistry.getInstrumentation().waitForIdleSync();
CriteriaHelper.pollUiThread(() -> {
return !mCoordinator.getBottomSheetViewForTesting()
.findViewById(R.id.account_picker_account_list)
.isShown();
});
checkZeroAccountBottomSheet();
}
......
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