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

Unified Diff: ios/web/shell/test/redirect_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/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

Powered by Google App Engine
This is Rietveld 408576698