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

Unified Diff: ios/chrome/browser/ui/qr_scanner/qr_scanner_view_controller_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/qr_scanner/qr_scanner_view_controller_egtest.mm
diff --git a/ios/chrome/browser/ui/qr_scanner/qr_scanner_view_controller_egtest.mm b/ios/chrome/browser/ui/qr_scanner/qr_scanner_view_controller_egtest.mm
index 97e40f8867e16f391c4ae866e86ff068b4276da9..a1b47878f81b83b957a344ca2482dc5c14343be6 100644
--- a/ios/chrome/browser/ui/qr_scanner/qr_scanner_view_controller_egtest.mm
+++ b/ios/chrome/browser/ui/qr_scanner/qr_scanner_view_controller_egtest.mm
@@ -24,6 +24,7 @@
#include "ios/chrome/grit/ios_strings.h"
#import "ios/chrome/test/app/chrome_test_util.h"
#import "ios/chrome/test/base/scoped_block_swizzler.h"
+#import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
#import "ios/chrome/test/earl_grey/chrome_matchers.h"
#import "ios/chrome/test/earl_grey/chrome_test_case.h"
#include "ios/shared/chrome/browser/ui/omnibox/location_bar_delegate.h"
@@ -280,14 +281,6 @@ void TapKeyboardReturnKeyInOmniboxWithText(std::string text) {
assertWithMatcher:grey_notNil()];
}
-// Checks that the page that is currently loaded contains the |response|.
-- (void)assertTestURLIsLoaded:(std::string)response {
- id<GREYMatcher> testURLResponseMatcher =
- chrome_test_util::WebViewContainingText(response);
- [[EarlGrey selectElementWithMatcher:testURLResponseMatcher]
- assertWithMatcher:grey_notNil()];
-}
-
#pragma mark helpers for dialogs
// Checks that the modal presented by |viewController| is of class |klass|.
@@ -787,7 +780,7 @@ void TapKeyboardReturnKeyInOmniboxWithText(std::string text) {
} else {
TapKeyboardReturnKeyInOmniboxWithText(result);
}
- [self assertTestURLIsLoaded:response];
+ [ChromeEarlGrey waitForWebViewContainingText:response];
// Press the back button to get back to the NTP.
TapButton(WebToolbarBackButton());
« no previous file with comments | « ios/chrome/browser/ui/print/print_controller_egtest.mm ('k') | ios/chrome/browser/ui/reading_list/reading_list_egtest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698