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

Unified Diff: ios/chrome/browser/web/visible_url_egtest.mm

Issue 2798773002: Create ChromeEarlGrey waitForWebViewContainingText. (Closed)
Patch Set: review comments Created 3 years, 6 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/chrome/browser/web/stop_loading_egtest.mm ('k') | ios/chrome/browser/web/window_open_by_dom_egtest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()];
}
« no previous file with comments | « ios/chrome/browser/web/stop_loading_egtest.mm ('k') | ios/chrome/browser/web/window_open_by_dom_egtest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698