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

Unified Diff: ios/chrome/browser/ui/error_page_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/error_page_egtest.mm
diff --git a/ios/chrome/browser/ui/error_page_egtest.mm b/ios/chrome/browser/ui/error_page_egtest.mm
index 51452b5916595b5d6ab70a0bb03d70e1ff1d1116..783847a685561d18d438fa713ebd34c1a8ab9798 100644
--- a/ios/chrome/browser/ui/error_page_egtest.mm
+++ b/ios/chrome/browser/ui/error_page_egtest.mm
@@ -4,14 +4,15 @@
#import <EarlGrey/EarlGrey.h>
+#include "base/strings/sys_string_conversions.h"
#include "components/strings/grit/components_strings.h"
#import "ios/chrome/test/app/chrome_test_util.h"
#include "ios/chrome/test/app/web_view_interaction_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/web/public/test/http_server.h"
#import "ios/web/public/test/earl_grey/web_view_matchers.h"
+#import "ios/web/public/test/http_server.h"
#include "ios/web/public/test/http_server_util.h"
#include "ios/web/public/test/response_providers/data_response_provider.h"
#include "ios/web/public/test/response_providers/error_page_response_provider.h"
@@ -24,7 +25,6 @@
using chrome_test_util::OmniboxText;
using chrome_test_util::TapWebViewElementWithId;
-using chrome_test_util::WebViewContainingText;
using chrome_test_util::WebViewNotContainingText;
using web::test::HttpServer;
@@ -139,8 +139,8 @@ using web::test::HttpServer;
[ChromeEarlGrey loadURL:URL];
// Check that the timer has completed.
- [[EarlGrey selectElementWithMatcher:WebViewContainingText(kTimerCompleted)]
- assertWithMatcher:grey_notNil()];
+ [ChromeEarlGrey
+ waitForWebViewContainingText:base::SysUTF8ToNSString(kTimerCompleted)];
// DNS error page should still not appear.
[self checkErrorPageIsNotVisible];
}
@@ -176,8 +176,8 @@ using web::test::HttpServer;
[ChromeEarlGrey loadURL:URL];
TapWebViewElementWithId(kButtonId);
// Check that the timer has completed.
- [[EarlGrey selectElementWithMatcher:WebViewContainingText(kTimerCompleted)]
- assertWithMatcher:grey_notNil()];
+ [ChromeEarlGrey
+ waitForWebViewContainingText:base::SysUTF8ToNSString(kTimerCompleted)];
// DNS error page should still not appear.
[self checkErrorPageIsNotVisible];
}

Powered by Google App Engine
This is Rietveld 408576698