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

Unified Diff: ios/chrome/browser/web/http_auth_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/web/http_auth_egtest.mm
diff --git a/ios/chrome/browser/web/http_auth_egtest.mm b/ios/chrome/browser/web/http_auth_egtest.mm
index 1cb4f43acd22e6198da3301a822a18669505ddde..88de2b7a2f0b4018bce396c5ccf9130b0f14ca69 100644
--- a/ios/chrome/browser/web/http_auth_egtest.mm
+++ b/ios/chrome/browser/web/http_auth_egtest.mm
@@ -10,6 +10,7 @@
#include "ios/chrome/browser/ui/ui_util.h"
#include "ios/chrome/grit/ios_strings.h"
#include "ios/chrome/test/app/navigation_test_util.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"
#import "ios/testing/wait_util.h"
@@ -21,7 +22,6 @@
using testing::WaitUntilConditionOrTimeout;
using testing::kWaitForPageLoadTimeout;
-using chrome_test_util::WebViewContainingText;
namespace {
@@ -91,9 +91,9 @@ void WaitForHttpAuthDialog() {
performAction:grey_typeText(@"goodpass")];
[[EarlGrey selectElementWithMatcher:LoginButton()] performAction:grey_tap()];
- const std::string pageText = web::HttpAuthResponseProvider::page_text();
- [[EarlGrey selectElementWithMatcher:WebViewContainingText(pageText)]
- assertWithMatcher:grey_notNil()];
+ NSString* pageText =
+ base::SysUTF8ToNSString(web::HttpAuthResponseProvider::page_text());
+ [ChromeEarlGrey waitForWebViewContainingText:pageText];
}
// Tests Basic HTTP Authentication with incorrect username and password.

Powered by Google App Engine
This is Rietveld 408576698