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

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

Issue 2798773002: Create ChromeEarlGrey waitForWebViewContainingText. (Closed)
Patch Set: better formatting Created 3 years, 8 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 e39d5008ebadfb2de67e7e2aad76ee942a5ee8e8..9f2e25a93f0b84aed4d2d679185b446428138119 100644
--- a/ios/chrome/browser/ui/browser_view_controller_egtest.mm
+++ b/ios/chrome/browser/ui/browser_view_controller_egtest.mm
@@ -53,10 +53,8 @@
[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()];
+ NSString* startResponse = base::SysUTF8ToNSString(responses[startURL]);
+ [ChromeEarlGrey waitForWebViewContainingText:startResponse];
// In the omnibox, the URL should be present, without the http:// prefix.
[[EarlGrey selectElementWithMatcher:chrome_test_util::Omnibox()]
@@ -81,10 +79,9 @@
@"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];
+ NSString* destinationResponse =
+ base::SysUTF8ToNSString(responses[destinationURL]);
+ [ChromeEarlGrey waitForWebViewContainingText:destinationResponse];
}
@end

Powered by Google App Engine
This is Rietveld 408576698