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

Unified Diff: ios/chrome/browser/ui/ntp/new_tab_page_egtest.mm

Issue 2606023003: Fix flaky NewTabPageTestCase.testOmnibox (Closed)
Patch Set: Created 4 years 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 | « ios/chrome/browser/ui/ntp/google_landing_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/ntp/new_tab_page_egtest.mm
diff --git a/ios/chrome/browser/ui/ntp/new_tab_page_egtest.mm b/ios/chrome/browser/ui/ntp/new_tab_page_egtest.mm
index 3fd2754d90e2f3c5a113564865035cd2e50fcda2..384447094e146cbcde58d9b24882ba84364863fe 100644
--- a/ios/chrome/browser/ui/ntp/new_tab_page_egtest.mm
+++ b/ios/chrome/browser/ui/ntp/new_tab_page_egtest.mm
@@ -28,6 +28,7 @@
@interface GoogleLandingController (ExposedForTesting)
- (BOOL)scrolledToTop;
+- (BOOL)animateHeader;
@end
namespace {
@@ -86,6 +87,11 @@ void AssertNTPScrolledToTop(bool scrolledToTop) {
chrome_test_util::GetCurrentNewTabPageController();
GoogleLandingController* google_landing_controller =
[ntp_controller googleLandingController];
+ [[GREYCondition
+ conditionWithName:@"Wait for end of animation."
+ block:^BOOL {
+ return ![google_landing_controller animateHeader];
+ }] waitWithTimeout:testing::kWaitForUIElementTimeout];
GREYAssertTrue([google_landing_controller scrolledToTop] == scrolledToTop,
@"scrolledToTop_ does not match expected value");
}
« no previous file with comments | « ios/chrome/browser/ui/ntp/google_landing_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698