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

Unified Diff: ios/chrome/browser/ui/settings/settings_egtest.mm

Issue 2798773002: Create ChromeEarlGrey waitForWebViewContainingText. (Closed)
Patch Set: review comments 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/settings/settings_egtest.mm
diff --git a/ios/chrome/browser/ui/settings/settings_egtest.mm b/ios/chrome/browser/ui/settings/settings_egtest.mm
index 0382d8998a30830cec114208856856231804a045..edb3005272b4ad6494005bca5148a35a2f25d6fe 100644
--- a/ios/chrome/browser/ui/settings/settings_egtest.mm
+++ b/ios/chrome/browser/ui/settings/settings_egtest.mm
@@ -621,9 +621,7 @@ bool IsCertificateCleared() {
// Load |kUrl| and check that cookie is not set.
[ChromeEarlGrey loadURL:web::test::HttpServer::MakeUrl(kUrl)];
- [[EarlGrey selectElementWithMatcher:chrome_test_util::WebViewContainingText(
- kResponse)]
- assertWithMatcher:grey_notNil()];
+ [ChromeEarlGrey waitForWebViewContainingText:kResponse];
NSDictionary* cookies = [ChromeEarlGrey cookies];
GREYAssertEqual(0U, cookies.count, @"No cookie should be found.");
@@ -631,13 +629,9 @@ bool IsCertificateCleared() {
// Visit |kUrlWithSetCookie| to set a cookie and then load |kUrl| to check it
// is still set.
[ChromeEarlGrey loadURL:web::test::HttpServer::MakeUrl(kUrlWithSetCookie)];
- [[EarlGrey selectElementWithMatcher:chrome_test_util::WebViewContainingText(
- kResponseWithSetCookie)]
- assertWithMatcher:grey_notNil()];
+ [ChromeEarlGrey waitForWebViewContainingText:kResponseWithSetCookie];
[ChromeEarlGrey loadURL:web::test::HttpServer::MakeUrl(kUrl)];
- [[EarlGrey selectElementWithMatcher:chrome_test_util::WebViewContainingText(
- kResponse)]
- assertWithMatcher:grey_notNil()];
+ [ChromeEarlGrey waitForWebViewContainingText:kResponse];
cookies = [ChromeEarlGrey cookies];
GREYAssertEqualObjects(kCookieValue, cookies[kCookieName],
@@ -656,9 +650,7 @@ bool IsCertificateCleared() {
// Reload and test that there are no cookies left.
[ChromeEarlGrey loadURL:web::test::HttpServer::MakeUrl(kUrl)];
- [[EarlGrey selectElementWithMatcher:chrome_test_util::WebViewContainingText(
- kResponse)]
- assertWithMatcher:grey_notNil()];
+ [ChromeEarlGrey waitForWebViewContainingText:kResponse];
cookies = [ChromeEarlGrey cookies];
GREYAssertEqual(0U, cookies.count, @"No cookie should be found.");
« no previous file with comments | « ios/chrome/browser/ui/reading_list/reading_list_egtest.mm ('k') | ios/chrome/browser/ui/toolbar/toolbar_egtest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698