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

Unified Diff: ios/chrome/browser/web/window_open_by_dom_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/window_open_by_dom_egtest.mm
diff --git a/ios/chrome/browser/web/window_open_by_dom_egtest.mm b/ios/chrome/browser/web/window_open_by_dom_egtest.mm
index 7938f833132bd52b361dd648fe7d0d668e582be0..8b5530c6cd403bae1e9701cce56afef222ac9725 100644
--- a/ios/chrome/browser/web/window_open_by_dom_egtest.mm
+++ b/ios/chrome/browser/web/window_open_by_dom_egtest.mm
@@ -19,7 +19,6 @@
using chrome_test_util::AssertMainTabCount;
using chrome_test_util::OmniboxText;
using chrome_test_util::TapWebViewElementWithId;
-using chrome_test_util::WebViewContainingText;
using web::test::HttpServer;
namespace {
@@ -48,8 +47,7 @@ const char kTestURL[] =
[super setUp];
// Open the test page. There should only be one tab open.
[ChromeEarlGrey loadURL:HttpServer::MakeUrl(kTestURL)];
- [[EarlGrey selectElementWithMatcher:WebViewContainingText("Expected result")]
- assertWithMatcher:grey_notNil()];
+ [ChromeEarlGrey waitForWebViewContainingText:@"Expected result"];
AssertMainTabCount(1);
}
@@ -71,8 +69,7 @@ const char kTestURL[] =
TapWebViewElementWithId("webScenarioWindowOpenSameURLWithBlankTarget");
AssertMainTabCount(2);
- [[EarlGrey selectElementWithMatcher:WebViewContainingText("Expected result")]
- assertWithMatcher:grey_notNil()];
+ [ChromeEarlGrey waitForWebViewContainingText:@"Expected result"];
id value = ExecuteJavaScript(@"sessionStorage.getItem('key');", &error);
GREYAssert(!error, @"Error during script execution: %@", error);

Powered by Google App Engine
This is Rietveld 408576698