Chromium Code Reviews| 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)] |
|
Eugene But (OOO till 7-30)
2016/05/09 15:59:08
Can be changed later.
Sounds like your matcher sh
baxley
2016/05/09 17:11:43
Okay, I'll wait. I don't know if there's a case wh
|
| + 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()]; |
| } |