| 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 cdab355450c6cc485a42af301fd31d888e96fed9..7872cd23bcba9560ced94bf25a5752dbdfc62606 100644
|
| --- a/ios/chrome/browser/ui/settings/settings_egtest.mm
|
| +++ b/ios/chrome/browser/ui/settings/settings_egtest.mm
|
| @@ -55,6 +55,7 @@
|
| #error "This file requires ARC support."
|
| #endif
|
|
|
| +using base::SysUTF8ToNSString;
|
| using chrome_test_util::ButtonWithAccessibilityLabelId;
|
| using chrome_test_util::NavigationBarDoneButton;
|
|
|
| @@ -649,9 +650,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:SysUTF8ToNSString(kResponse)];
|
|
|
| NSDictionary* cookies = [ChromeEarlGrey cookies];
|
| GREYAssertEqual(0U, cookies.count, @"No cookie should be found.");
|
| @@ -659,13 +658,10 @@ 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:SysUTF8ToNSString(kResponseWithSetCookie)];
|
| [ChromeEarlGrey loadURL:web::test::HttpServer::MakeUrl(kUrl)];
|
| - [[EarlGrey selectElementWithMatcher:chrome_test_util::WebViewContainingText(
|
| - kResponse)]
|
| - assertWithMatcher:grey_notNil()];
|
| + [ChromeEarlGrey waitForWebViewContainingText:SysUTF8ToNSString(kResponse)];
|
|
|
| cookies = [ChromeEarlGrey cookies];
|
| GREYAssertEqualObjects(kCookieValue, cookies[kCookieName],
|
| @@ -684,9 +680,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:SysUTF8ToNSString(kResponse)];
|
|
|
| cookies = [ChromeEarlGrey cookies];
|
| GREYAssertEqual(0U, cookies.count, @"No cookie should be found.");
|
|
|