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

Unified Diff: ios/chrome/browser/web/progress_indicator_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
Index: ios/chrome/browser/web/progress_indicator_egtest.mm
diff --git a/ios/chrome/browser/web/progress_indicator_egtest.mm b/ios/chrome/browser/web/progress_indicator_egtest.mm
index cecc6d017a63957f5af4a7b4a1ec452938d40d44..54c735ca374f8158282994eab382d52e4ee9ef8e 100644
--- a/ios/chrome/browser/web/progress_indicator_egtest.mm
+++ b/ios/chrome/browser/web/progress_indicator_egtest.mm
@@ -152,8 +152,7 @@ class InfinitePendingResponseProvider : public HtmlResponseProvider {
chrome_test_util::LoadUrl(infinitePendingURL);
// Wait until the page is half loaded.
- [[EarlGrey selectElementWithMatcher:WebViewContainingText(kPageText)]
- assertWithMatcher:grey_notNil()];
+ [ChromeEarlGrey waitForWebViewContainingText:kPageText];
// Verify progress view visible and halfway progress.
[[EarlGrey selectElementWithMatcher:ProgressViewWithProgress(0.5)]
@@ -185,12 +184,17 @@ class InfinitePendingResponseProvider : public HtmlResponseProvider {
// Load form first.
[ChromeEarlGrey loadURL:formURL];
+ // TODO(crbug.com/707009): Replace this matcher with
+ // [ChromeEarlGrey waitForWebViewContainingText]. It fails to synchronize with
+ // the progress bar.
[[EarlGrey selectElementWithMatcher:WebViewContainingText(kFormPageText)]
assertWithMatcher:grey_notNil()];
chrome_test_util::SubmitWebViewFormWithId(kFormID);
// Wait until the page is half loaded.
+ // TODO(crbug.com/707009): Replace this matcher with
+ // [ChromeEarlGrey waitForWebViewContainingText].
[[EarlGrey selectElementWithMatcher:WebViewContainingText(kPageText)]
assertWithMatcher:grey_notNil()];
@@ -218,14 +222,12 @@ class InfinitePendingResponseProvider : public HtmlResponseProvider {
[ChromeEarlGrey loadURL:formURL];
- [[EarlGrey selectElementWithMatcher:WebViewContainingText(kFormPageText)]
- assertWithMatcher:grey_notNil()];
+ [ChromeEarlGrey waitForWebViewContainingText:kFormPageText];
chrome_test_util::SubmitWebViewFormWithId(kFormID);
// Verify the new page has been loaded.
- [[EarlGrey selectElementWithMatcher:WebViewContainingText(kPageText)]
- assertWithMatcher:grey_notNil()];
+ [ChromeEarlGrey waitForWebViewContainingText:kPageText];
// Verify progress view is not visible.
[[EarlGrey selectElementWithMatcher:ProgressView()]
@@ -248,8 +250,7 @@ class InfinitePendingResponseProvider : public HtmlResponseProvider {
[ChromeEarlGrey loadURL:formURL];
// Verify the form page has been loaded.
- [[EarlGrey selectElementWithMatcher:WebViewContainingText(kFormPageText)]
- assertWithMatcher:grey_notNil()];
+ [ChromeEarlGrey waitForWebViewContainingText:kFormPageText];
chrome_test_util::SubmitWebViewFormWithId(kFormID);
« no previous file with comments | « ios/chrome/browser/web/navigation_egtest.mm ('k') | ios/chrome/browser/web/push_and_replace_state_navigation_egtest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698