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

Unified Diff: ios/chrome/browser/translate/translate_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/translate/translate_egtest.mm
diff --git a/ios/chrome/browser/translate/translate_egtest.mm b/ios/chrome/browser/translate/translate_egtest.mm
index 5b3dee87cb60edbc595ede91bbf8e7e572142545..11af4f98b0bc872e34826084521608b6fef6c657 100644
--- a/ios/chrome/browser/translate/translate_egtest.mm
+++ b/ios/chrome/browser/translate/translate_egtest.mm
@@ -777,25 +777,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