Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Unified Diff: ios/chrome/test/earl_grey/chrome_test_case.mm

Issue 2652343005: Add a timeout on the EG DrainUntilIdle (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/test/earl_grey/chrome_test_case.mm
diff --git a/ios/chrome/test/earl_grey/chrome_test_case.mm b/ios/chrome/test/earl_grey/chrome_test_case.mm
index 822d95b62ea23788073267a90abbadc1f3da4c4f..9cf8d365f15f6898fc018e8281f0ddc77c34390e 100644
--- a/ios/chrome/test/earl_grey/chrome_test_case.mm
+++ b/ios/chrome/test/earl_grey/chrome_test_case.mm
@@ -70,6 +70,8 @@ NSArray* whiteListedMultitaskingTests = @[
@"testUserFeedbackPageOpenPrivacyPolicy", // UserFeedbackTestCase
@"testVersion", // WebUITestCase
];
+
+const CFTimeInterval kDrainTimeout = 5;
} // namespace
@interface ChromeTestCase () {
@@ -204,12 +206,14 @@ NSArray* whiteListedMultitaskingTests = @[
// After programatically removing UI elements, allow Earl Grey's
// UI synchronization to become idle, so subsequent steps won't start before
// the UI is in a good state.
- [[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
+ [[GREYUIThreadExecutor sharedInstance]
+ drainUntilIdleWithTimeout:kDrainTimeout];
}
+ (void)closeAllTabs {
chrome_test_util::CloseAllTabs();
- [[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
+ [[GREYUIThreadExecutor sharedInstance]
+ drainUntilIdleWithTimeout:kDrainTimeout];
}
- (void)disableMockAuthentication {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698