Chromium Code Reviews| Index: ios/chrome/browser/ui/history/history_ui_egtest.mm |
| diff --git a/ios/chrome/browser/ui/history/history_ui_egtest.mm b/ios/chrome/browser/ui/history/history_ui_egtest.mm |
| index beae9e14907e12e652afc8f07f61c48a9d45834a..39daa1e8bcc70116ba277be76f6cde7cef63900c 100644 |
| --- a/ios/chrome/browser/ui/history/history_ui_egtest.mm |
| +++ b/ios/chrome/browser/ui/history/history_ui_egtest.mm |
| @@ -41,10 +41,10 @@ |
| #error "This file requires ARC support." |
| #endif |
| +using base::SysUTF8ToNSString; |
| using chrome_test_util::ButtonWithAccessibilityLabelId; |
| using chrome_test_util::NavigationBarDoneButton; |
| using chrome_test_util::OpenLinkInNewTabButton; |
| -using chrome_test_util::WebViewContainingText; |
| namespace { |
| char kURL1[] = "http://firstURL"; |
| @@ -58,8 +58,8 @@ char kResponse3[] = "Test Page 3 content"; |
| // Matcher for entry in history for URL and title. |
| id<GREYMatcher> HistoryEntry(const GURL& url, const std::string& title) { |
| - NSString* url_spec_text = base::SysUTF8ToNSString(url.spec()); |
| - NSString* title_text = base::SysUTF8ToNSString(title); |
| + NSString* url_spec_text = SysUTF8ToNSString(url.spec()); |
|
Eugene But (OOO till 7-30)
2017/06/12 03:47:11
nit: Is this really necessary?
baxley
2017/06/12 16:41:17
Nope. This was there from when I had the API take
|
| + NSString* title_text = SysUTF8ToNSString(title); |
| MatchesBlock matches = ^BOOL(HistoryEntryCell* cell) { |
| return [cell.textLabel.text isEqual:title_text] && |
| @@ -253,8 +253,7 @@ void MockSignIn() { |
| // Tap a history entry and assert that navigation to that entry's URL occurs. |
| [[EarlGrey selectElementWithMatcher:HistoryEntry(_URL1, kTitle1)] |
| performAction:grey_tap()]; |
| - [[EarlGrey selectElementWithMatcher:WebViewContainingText(kResponse1)] |
| - assertWithMatcher:grey_notNil()]; |
| + [ChromeEarlGrey waitForWebViewContainingText:kResponse1]; |
| } |
| // Tests that history is not changed after performing back navigation. |
| @@ -264,8 +263,7 @@ void MockSignIn() { |
| [[EarlGrey selectElementWithMatcher:chrome_test_util::BackButton()] |
| performAction:grey_tap()]; |
| - [[EarlGrey selectElementWithMatcher:WebViewContainingText(kResponse1)] |
| - assertWithMatcher:grey_notNil()]; |
| + [ChromeEarlGrey waitForWebViewContainingText:kResponse1]; |
| [self openHistoryPanel]; |
| @@ -482,16 +480,13 @@ void MockSignIn() { |
| - (void)loadTestURLs { |
| [ChromeEarlGrey loadURL:_URL1]; |
| - [[EarlGrey selectElementWithMatcher:WebViewContainingText(kResponse1)] |
| - assertWithMatcher:grey_notNil()]; |
| + [ChromeEarlGrey waitForWebViewContainingText:kResponse1]; |
| [ChromeEarlGrey loadURL:_URL2]; |
| - [[EarlGrey selectElementWithMatcher:WebViewContainingText(kResponse2)] |
| - assertWithMatcher:grey_notNil()]; |
| + [ChromeEarlGrey waitForWebViewContainingText:kResponse2]; |
| [ChromeEarlGrey loadURL:_URL3]; |
| - [[EarlGrey selectElementWithMatcher:WebViewContainingText(kResponse3)] |
| - assertWithMatcher:grey_notNil()]; |
| + [ChromeEarlGrey waitForWebViewContainingText:kResponse3]; |
| } |
| - (void)openHistoryPanel { |