| Index: ios/web/shell/test/redirect_egtest.mm
|
| diff --git a/ios/web/shell/test/redirect_egtest.mm b/ios/web/shell/test/redirect_egtest.mm
|
| index b9df80e35ed3d915ddf18987d35a9a35f5bf6874..3afae75232c541a9161136882592ff1525373a33 100644
|
| --- a/ios/web/shell/test/redirect_egtest.mm
|
| +++ b/ios/web/shell/test/redirect_egtest.mm
|
| @@ -4,6 +4,7 @@
|
|
|
| #import <EarlGrey/EarlGrey.h>
|
|
|
| +#include "base/strings/sys_string_conversions.h"
|
| #import "ios/web/public/test/http_server.h"
|
| #include "ios/web/public/test/http_server_util.h"
|
| #import "ios/web/public/test/response_providers/html_response_provider.h"
|
| @@ -19,7 +20,6 @@
|
|
|
| using web::AddressFieldText;
|
| using web::test::HttpServer;
|
| -using web::WebViewContainingText;
|
|
|
| // Redirect test cases for the web shell.
|
| @interface RedirectTestCase : WebShellTestCase
|
| @@ -53,8 +53,8 @@ using web::WebViewContainingText;
|
| [ShellEarlGrey loadURL:firstRedirectURL];
|
| [[EarlGrey selectElementWithMatcher:AddressFieldText(destinationURL.spec())]
|
| assertWithMatcher:grey_notNil()];
|
| - [[EarlGrey selectElementWithMatcher:WebViewContainingText(kFinalPageContent)]
|
| - assertWithMatcher:grey_notNil()];
|
| + [ShellEarlGrey
|
| + waitForWebViewContainingText:base::SysUTF8ToNSString(kFinalPageContent)];
|
| }
|
|
|
| // Tests simple 301 redirection.
|
| @@ -77,8 +77,8 @@ using web::WebViewContainingText;
|
| [ShellEarlGrey loadURL:firstRedirectURL];
|
| [[EarlGrey selectElementWithMatcher:AddressFieldText(destinationURL.spec())]
|
| assertWithMatcher:grey_notNil()];
|
| - [[EarlGrey selectElementWithMatcher:WebViewContainingText(kFinalPageContent)]
|
| - assertWithMatcher:grey_notNil()];
|
| + [ShellEarlGrey
|
| + waitForWebViewContainingText:base::SysUTF8ToNSString(kFinalPageContent)];
|
| }
|
|
|
| // Tests simple 302 redirection.
|
| @@ -101,8 +101,8 @@ using web::WebViewContainingText;
|
| [ShellEarlGrey loadURL:firstRedirectURL];
|
| [[EarlGrey selectElementWithMatcher:AddressFieldText(destinationURL.spec())]
|
| assertWithMatcher:grey_notNil()];
|
| - [[EarlGrey selectElementWithMatcher:WebViewContainingText(kFinalPageContent)]
|
| - assertWithMatcher:grey_notNil()];
|
| + [ShellEarlGrey
|
| + waitForWebViewContainingText:base::SysUTF8ToNSString(kFinalPageContent)];
|
| }
|
|
|
| @end
|
|
|