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

Unified Diff: ios/chrome/browser/translate/translate_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/translate/translate_egtest.mm
diff --git a/ios/chrome/browser/translate/translate_egtest.mm b/ios/chrome/browser/translate/translate_egtest.mm
index 8187888b9e9c7f91ad27711888aed1b217f28a4c..7d09e776346ec60d0a218048a750c0242631f04d 100644
--- a/ios/chrome/browser/translate/translate_egtest.mm
+++ b/ios/chrome/browser/translate/translate_egtest.mm
@@ -761,25 +761,19 @@ using translate::LanguageDetectionController;
@"Did not receive all translate status callbacks");
// Check that the translation happened.
- [[EarlGrey selectElementWithMatcher:chrome_test_util::WebViewContainingText(
- "Translated")]
- assertWithMatcher:grey_notNil()];
+ [ChromeEarlGrey waitForWebViewContainingText:@"Translated"];
// Click on the link.
[ChromeEarlGrey tapWebViewElementWithID:@"link"];
GURL frenchPagePathURL = web::test::HttpServer::MakeUrl(
base::StringPrintf("http://%s", kFrenchPagePath));
- [[EarlGrey
- selectElementWithMatcher:chrome_test_util::WebViewContainingText("link")]
- assertWithMatcher:grey_nil()];
+ [ChromeEarlGrey waitForWebViewContainingText:@"link"];
[[EarlGrey selectElementWithMatcher:chrome_test_util::OmniboxText(
frenchPagePathURL.GetContent())]
assertWithMatcher:grey_notNil()];
// Check that the auto-translation happened.
- [[EarlGrey selectElementWithMatcher:chrome_test_util::WebViewContainingText(
- "Translated")]
- assertWithMatcher:grey_notNil()];
+ [ChromeEarlGrey waitForWebViewContainingText:@"Translated"];
}
#pragma mark - Utility methods

Powered by Google App Engine
This is Rietveld 408576698