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

Unified Diff: ios/chrome/browser/ui/browser_view_controller_egtest.mm

Issue 2798773002: Create ChromeEarlGrey waitForWebViewContainingText. (Closed)
Patch Set: more cleanup Created 3 years, 6 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
Index: ios/chrome/browser/ui/browser_view_controller_egtest.mm
diff --git a/ios/chrome/browser/ui/browser_view_controller_egtest.mm b/ios/chrome/browser/ui/browser_view_controller_egtest.mm
index b6445ba16e9f171439395a52990783722de0186f..51afc521d0db3a34d7f2c42333cb1e3f99d0c715 100644
--- a/ios/chrome/browser/ui/browser_view_controller_egtest.mm
+++ b/ios/chrome/browser/ui/browser_view_controller_egtest.mm
@@ -53,10 +53,7 @@
[ChromeEarlGrey loadURL:startURL];
// Waits for the page to load and check it is the expected content.
- id<GREYMatcher> responseMatcher =
- chrome_test_util::WebViewContainingText(responses[startURL]);
- [[EarlGrey selectElementWithMatcher:responseMatcher]
- assertWithMatcher:grey_notNil()];
+ [ChromeEarlGrey waitForWebViewContainingText:responses[startURL]];
// In the omnibox, the URL should be present, without the http:// prefix.
[[EarlGrey selectElementWithMatcher:chrome_test_util::Omnibox()]
@@ -81,10 +78,7 @@
@"Did not navigate to the destination url.");
// Verifies that the destination page is shown.
- id<GREYMatcher> navigationMatcher =
- chrome_test_util::WebViewContainingText(responses[destinationURL]);
- [[EarlGrey selectElementWithMatcher:grey_kindOfClass([WKWebView class])]
- assertWithMatcher:navigationMatcher];
+ [ChromeEarlGrey waitForWebViewContainingText:responses[destinationURL]];
}
@end

Powered by Google App Engine
This is Rietveld 408576698