| 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 3f208318a1c3c256b637526bfcfa12706b46d9d8..7b62013ab42bf63b198840815330996be0aa0b93 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());
|
| + NSString* title_text = SysUTF8ToNSString(title);
|
|
|
| MatchesBlock matches = ^BOOL(HistoryEntryCell* cell) {
|
| return [cell.textLabel.text isEqual:title_text] &&
|
| @@ -259,8 +259,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:SysUTF8ToNSString(kResponse1)];
|
| }
|
|
|
| // Tests that history is not changed after performing back navigation.
|
| @@ -270,8 +269,7 @@ void MockSignIn() {
|
|
|
| [[EarlGrey selectElementWithMatcher:chrome_test_util::BackButton()]
|
| performAction:grey_tap()];
|
| - [[EarlGrey selectElementWithMatcher:WebViewContainingText(kResponse1)]
|
| - assertWithMatcher:grey_notNil()];
|
| + [ChromeEarlGrey waitForWebViewContainingText:SysUTF8ToNSString(kResponse1)];
|
|
|
| [self openHistoryPanel];
|
|
|
| @@ -488,16 +486,13 @@ void MockSignIn() {
|
|
|
| - (void)loadTestURLs {
|
| [ChromeEarlGrey loadURL:_URL1];
|
| - [[EarlGrey selectElementWithMatcher:WebViewContainingText(kResponse1)]
|
| - assertWithMatcher:grey_notNil()];
|
| + [ChromeEarlGrey waitForWebViewContainingText:SysUTF8ToNSString(kResponse1)];
|
|
|
| [ChromeEarlGrey loadURL:_URL2];
|
| - [[EarlGrey selectElementWithMatcher:WebViewContainingText(kResponse2)]
|
| - assertWithMatcher:grey_notNil()];
|
| + [ChromeEarlGrey waitForWebViewContainingText:SysUTF8ToNSString(kResponse2)];
|
|
|
| [ChromeEarlGrey loadURL:_URL3];
|
| - [[EarlGrey selectElementWithMatcher:WebViewContainingText(kResponse3)]
|
| - assertWithMatcher:grey_notNil()];
|
| + [ChromeEarlGrey waitForWebViewContainingText:SysUTF8ToNSString(kResponse3)];
|
| }
|
|
|
| - (void)openHistoryPanel {
|
|
|