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

Unified Diff: ios/chrome/browser/ui/history/history_ui_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/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..acbdaafec7c505505c39155d23e496f6927df303 100644
--- a/ios/chrome/browser/ui/history/history_ui_egtest.mm
+++ b/ios/chrome/browser/ui/history/history_ui_egtest.mm
@@ -44,7 +44,6 @@
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";
@@ -253,8 +252,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 +262,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 +479,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 {

Powered by Google App Engine
This is Rietveld 408576698