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

Unified Diff: ios/web/shell/test/web_shell_navigation_egtest.mm

Issue 1961063002: Add web shell matcher for address field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/Element/UIElement Created 4 years, 7 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
« no previous file with comments | « ios/web/shell/test/earl_grey/shell_matchers.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/shell/test/web_shell_navigation_egtest.mm
diff --git a/ios/web/shell/test/web_shell_navigation_egtest.mm b/ios/web/shell/test/web_shell_navigation_egtest.mm
index a9a197401fcaf5dc315dd2f6071029a0542d392d..c30e47240e91b6323311b37d7f240949de41f2b9 100644
--- a/ios/web/shell/test/web_shell_navigation_egtest.mm
+++ b/ios/web/shell/test/web_shell_navigation_egtest.mm
@@ -53,10 +53,12 @@
// Create map of canned responses and set up the test HTML server.
std::map<GURL, std::string> responses;
const GURL URL1 = web::test::HttpServer::MakeUrl("http://firstURL");
+ NSString* URL1Text = base::SysUTF8ToNSString(URL1.spec());
NSString* response1 = @"Test Page 1";
responses[URL1] = base::SysNSStringToUTF8(response1);
const GURL URL2 = web::test::HttpServer::MakeUrl("http://secondURL");
+ NSString* URL2Text = base::SysUTF8ToNSString(URL2.spec());
NSString* response2 = @"Test Page 2";
responses[URL2] = base::SysNSStringToUTF8(response2);
@@ -65,24 +67,28 @@
web::WebState* webState = web::web_shell_test_util::GetCurrentWebState();
web::navigation_test_util::LoadUrl(webState, URL1);
-
+ [[EarlGrey selectElementWithMatcher:web::addressFieldText(URL1Text)]
+ assertWithMatcher:grey_notNil()];
[[EarlGrey selectElementWithMatcher:web::webViewContainingText(response1)]
assertWithMatcher:grey_notNil()];
web::navigation_test_util::LoadUrl(webState, URL2);
-
+ [[EarlGrey selectElementWithMatcher:web::addressFieldText(URL2Text)]
+ assertWithMatcher:grey_notNil()];
[[EarlGrey selectElementWithMatcher:web::webViewContainingText(response2)]
assertWithMatcher:grey_notNil()];
[[EarlGrey selectElementWithMatcher:web::backButton()]
performAction:grey_tap()];
-
+ [[EarlGrey selectElementWithMatcher:web::addressFieldText(URL1Text)]
+ assertWithMatcher:grey_notNil()];
[[EarlGrey selectElementWithMatcher:web::webViewContainingText(response1)]
assertWithMatcher:grey_notNil()];
[[EarlGrey selectElementWithMatcher:web::forwardButton()]
performAction:grey_tap()];
-
+ [[EarlGrey selectElementWithMatcher:web::addressFieldText(URL2Text)]
+ assertWithMatcher:grey_notNil()];
[[EarlGrey selectElementWithMatcher:web::webViewContainingText(response2)]
assertWithMatcher:grey_notNil()];
}
« no previous file with comments | « ios/web/shell/test/earl_grey/shell_matchers.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698