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

Unified Diff: ios/chrome/browser/ui/qr_scanner/qr_scanner_view_controller_egtest.mm

Issue 2798773002: Create ChromeEarlGrey waitForWebViewContainingText. (Closed)
Patch Set: better formatting Created 3 years, 8 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 31aabe36b105c3c4bc0d41e5ab13b76fb8ad48ff..609623709c7adbc73645a8ba5f712533884ad746 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
@@ -25,6 +25,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"
@@ -277,14 +278,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|.
@@ -786,7 +779,8 @@ void TapKeyboardReturnKeyInOmniboxWithText(std::string text) {
} else {
TapKeyboardReturnKeyInOmniboxWithText(result);
}
- [self assertTestURLIsLoaded:response];
+ [ChromeEarlGrey
+ waitForWebViewContainingText:base::SysUTF8ToNSString(response)];
// Press the back button to get back to the NTP.
TapButton(WebToolbarBackButton());

Powered by Google App Engine
This is Rietveld 408576698