Commit b6cb5455 authored by Vaclav Brozek's avatar Vaclav Brozek Committed by Commit Bot

Drain UI thread in PasswordsSettingsTestCase/testDeletionInDetailView

As logs from trybots suggest (see the associated bug), the state of the
UI during this test sometimes lags behind the test's expectations. This
CL attempts to prevent it by draining the UI thread at the moment where
the test frequently fails.

This was impossible to verify on available trybots, but should at least
be verifiable on
https://build.chromium.org/p/chromium.fyi/builders/EarlGreyiOS, where
the flake is rather reliable (the test never passes on the very first
attempt).

TBR=sdefresne@chromium.org

Bug: 747058
Change-Id: Ib9cd3c2669357f22bc8d19474c82dabe66801740
Reviewed-on: https://chromium-review.googlesource.com/579972
Commit-Queue: Vaclav Brozek <vabr@chromium.org>
Reviewed-by: default avatarMike Baxley <baxley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488384}
parent 9ae0cdee
......@@ -582,6 +582,9 @@ MockReauthenticationModule* SetUpAndReturnMockReauthenticationModule() {
grey_sufficientlyVisible(), nullptr)]
performAction:grey_tap()];
// Wait until the alert and the detail view are dismissed.
[[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
// Check that the current view is now the list view, by locating the header
// of the list of passwords.
[[EarlGrey selectElementWithMatcher:
......
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