| Index: ios/chrome/browser/web/visible_url_egtest.mm
|
| diff --git a/ios/chrome/browser/web/visible_url_egtest.mm b/ios/chrome/browser/web/visible_url_egtest.mm
|
| index e9050920b1685bffd9878abaed53269609654115..8ca6be40a3b5e5f80aea69f61b8c34e5d83e24cf 100644
|
| --- a/ios/chrome/browser/web/visible_url_egtest.mm
|
| +++ b/ios/chrome/browser/web/visible_url_egtest.mm
|
| @@ -28,7 +28,6 @@
|
| #error "This file requires ARC support."
|
| #endif
|
|
|
| -using chrome_test_util::WebViewContainingText;
|
| using chrome_test_util::OmniboxText;
|
|
|
| namespace {
|
| @@ -198,8 +197,7 @@ class PausableResponseProvider : public HtmlResponseProvider {
|
|
|
| // Make server respond so URL1 becomes committed.
|
| [self setServerPaused:NO];
|
| - [[EarlGrey selectElementWithMatcher:WebViewContainingText(kTestPage1)]
|
| - assertWithMatcher:grey_notNil()];
|
| + [ChromeEarlGrey waitForWebViewContainingText:kTestPage1];
|
| [[EarlGrey selectElementWithMatcher:OmniboxText(_testURL1.GetContent())]
|
| assertWithMatcher:grey_notNil()];
|
|
|
| @@ -219,8 +217,7 @@ class PausableResponseProvider : public HtmlResponseProvider {
|
|
|
| // Make server respond so URL2 becomes committed.
|
| [self setServerPaused:NO];
|
| - [[EarlGrey selectElementWithMatcher:WebViewContainingText(kTestPage2)]
|
| - assertWithMatcher:grey_notNil()];
|
| + [ChromeEarlGrey waitForWebViewContainingText:kTestPage2];
|
| [[EarlGrey selectElementWithMatcher:OmniboxText(_testURL2.GetContent())]
|
| assertWithMatcher:grey_notNil()];
|
| }
|
| @@ -248,8 +245,7 @@ class PausableResponseProvider : public HtmlResponseProvider {
|
|
|
| // Make server respond so URL1 becomes committed.
|
| [self setServerPaused:NO];
|
| - [[EarlGrey selectElementWithMatcher:WebViewContainingText(kTestPage1)]
|
| - assertWithMatcher:grey_notNil()];
|
| + [ChromeEarlGrey waitForWebViewContainingText:kTestPage1];
|
| [[EarlGrey selectElementWithMatcher:OmniboxText(_testURL1.GetContent())]
|
| assertWithMatcher:grey_notNil()];
|
| }
|
| @@ -281,8 +277,7 @@ class PausableResponseProvider : public HtmlResponseProvider {
|
|
|
| // Make server respond and verify that page2 was reloaded, not page1.
|
| [self setServerPaused:NO];
|
| - [[EarlGrey selectElementWithMatcher:WebViewContainingText(kTestPage2)]
|
| - assertWithMatcher:grey_notNil()];
|
| + [ChromeEarlGrey waitForWebViewContainingText:kTestPage2];
|
| [[EarlGrey selectElementWithMatcher:OmniboxText(_testURL2.GetContent())]
|
| assertWithMatcher:grey_notNil()];
|
| }
|
| @@ -305,8 +300,7 @@ class PausableResponseProvider : public HtmlResponseProvider {
|
|
|
| // Make server respond so URL1 becomes committed.
|
| [self setServerPaused:NO];
|
| - [[EarlGrey selectElementWithMatcher:WebViewContainingText(kTestPage1)]
|
| - assertWithMatcher:grey_notNil()];
|
| + [ChromeEarlGrey waitForWebViewContainingText:kTestPage1];
|
| [[EarlGrey selectElementWithMatcher:OmniboxText(_testURL1.GetContent())]
|
| assertWithMatcher:grey_notNil()];
|
|
|
| @@ -326,8 +320,7 @@ class PausableResponseProvider : public HtmlResponseProvider {
|
|
|
| // Make server respond so URL2 becomes committed.
|
| [self setServerPaused:NO];
|
| - [[EarlGrey selectElementWithMatcher:WebViewContainingText(kTestPage2)]
|
| - assertWithMatcher:grey_notNil()];
|
| + [ChromeEarlGrey waitForWebViewContainingText:kTestPage2];
|
| [[EarlGrey selectElementWithMatcher:OmniboxText(_testURL2.GetContent())]
|
| assertWithMatcher:grey_notNil()];
|
| }
|
| @@ -351,8 +344,7 @@ class PausableResponseProvider : public HtmlResponseProvider {
|
|
|
| // Make server respond so URL1 becomes committed.
|
| [self setServerPaused:NO];
|
| - [[EarlGrey selectElementWithMatcher:WebViewContainingText(kTestPage1)]
|
| - assertWithMatcher:grey_notNil()];
|
| + [ChromeEarlGrey waitForWebViewContainingText:kTestPage1];
|
| [[EarlGrey selectElementWithMatcher:OmniboxText(_testURL1.GetContent())]
|
| assertWithMatcher:grey_notNil()];
|
|
|
| @@ -372,8 +364,7 @@ class PausableResponseProvider : public HtmlResponseProvider {
|
|
|
| // Make server respond so URL2 becomes committed.
|
| [self setServerPaused:NO];
|
| - [[EarlGrey selectElementWithMatcher:WebViewContainingText(kTestPage2)]
|
| - assertWithMatcher:grey_notNil()];
|
| + [ChromeEarlGrey waitForWebViewContainingText:kTestPage2];
|
| [[EarlGrey selectElementWithMatcher:OmniboxText(_testURL2.GetContent())]
|
| assertWithMatcher:grey_notNil()];
|
| }
|
| @@ -409,8 +400,7 @@ class PausableResponseProvider : public HtmlResponseProvider {
|
|
|
| // Make server respond so URL1 becomes committed.
|
| [self setServerPaused:NO];
|
| - [[EarlGrey selectElementWithMatcher:WebViewContainingText(kTestPage1)]
|
| - assertWithMatcher:grey_notNil()];
|
| + [ChromeEarlGrey waitForWebViewContainingText:kTestPage1];
|
| [[EarlGrey selectElementWithMatcher:OmniboxText(_testURL1.GetContent())]
|
| assertWithMatcher:grey_notNil()];
|
| }
|
| @@ -439,8 +429,7 @@ class PausableResponseProvider : public HtmlResponseProvider {
|
|
|
| // Make server respond so URL1 becomes committed.
|
| [self setServerPaused:NO];
|
| - [[EarlGrey selectElementWithMatcher:WebViewContainingText(kTestPage1)]
|
| - assertWithMatcher:grey_notNil()];
|
| + [ChromeEarlGrey waitForWebViewContainingText:kTestPage1];
|
| [[EarlGrey selectElementWithMatcher:OmniboxText(_testURL1.GetContent())]
|
| assertWithMatcher:grey_notNil()];
|
| }
|
| @@ -470,8 +459,7 @@ class PausableResponseProvider : public HtmlResponseProvider {
|
|
|
| // Make server respond so URL1 becomes committed.
|
| [self setServerPaused:NO];
|
| - [[EarlGrey selectElementWithMatcher:WebViewContainingText(kTestPage3)]
|
| - assertWithMatcher:grey_notNil()];
|
| + [ChromeEarlGrey waitForWebViewContainingText:kTestPage3];
|
| [[EarlGrey selectElementWithMatcher:OmniboxText(_testURL3.GetContent())]
|
| assertWithMatcher:grey_notNil()];
|
| }
|
| @@ -501,8 +489,7 @@ class PausableResponseProvider : public HtmlResponseProvider {
|
|
|
| // Make server respond so URL1 becomes committed.
|
| [self setServerPaused:NO];
|
| - [[EarlGrey selectElementWithMatcher:WebViewContainingText(kTestPage1)]
|
| - assertWithMatcher:grey_notNil()];
|
| + [ChromeEarlGrey waitForWebViewContainingText:kTestPage1];
|
| [[EarlGrey selectElementWithMatcher:OmniboxText(_testURL1.GetContent())]
|
| assertWithMatcher:grey_notNil()];
|
| }
|
| @@ -519,8 +506,7 @@ class PausableResponseProvider : public HtmlResponseProvider {
|
| performAction:grey_tap()];
|
| [[EarlGrey selectElementWithMatcher:chrome_test_util::BackButton()]
|
| performAction:grey_tap()];
|
| - [[EarlGrey selectElementWithMatcher:WebViewContainingText(kTestPage1)]
|
| - assertWithMatcher:grey_notNil()];
|
| + [ChromeEarlGrey waitForWebViewContainingText:kTestPage1];
|
|
|
| // Quickly (using chrome command) navigate forward twice and wait for
|
| // kChromeUIVersionURL to load.
|
| @@ -530,8 +516,7 @@ class PausableResponseProvider : public HtmlResponseProvider {
|
| chrome_test_util::RunCommandWithActiveViewController(forwardCommand);
|
|
|
| const std::string version = version_info::GetVersionNumber();
|
| - [[EarlGrey selectElementWithMatcher:WebViewContainingText(version)]
|
| - assertWithMatcher:grey_notNil()];
|
| + [ChromeEarlGrey waitForWebViewContainingText:version];
|
|
|
| // Make sure that kChromeUIVersionURL URL is displayed in the omnibox.
|
| std::string expectedText = base::UTF16ToUTF8(web::GetDisplayTitleForUrl(URL));
|
| @@ -562,8 +547,7 @@ class PausableResponseProvider : public HtmlResponseProvider {
|
|
|
| // Make server respond so URL1 becomes committed.
|
| [self setServerPaused:NO];
|
| - [[EarlGrey selectElementWithMatcher:WebViewContainingText(kTestPage1)]
|
| - assertWithMatcher:grey_notNil()];
|
| + [ChromeEarlGrey waitForWebViewContainingText:kTestPage1];
|
| [[EarlGrey selectElementWithMatcher:OmniboxText(_testURL1.GetContent())]
|
| assertWithMatcher:grey_notNil()];
|
| }
|
|
|