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

Unified Diff: ios/chrome/browser/web/window_open_by_dom_egtest.mm

Issue 2798773002: Create ChromeEarlGrey waitForWebViewContainingText. (Closed)
Patch Set: more cleanup 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/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 fbfe60f2b2323bfc7548f35ba4b82107a5716de9..8ac49f6708df115b159a056eb97a6ce21b3407e8 100644
--- a/ios/chrome/browser/web/window_open_by_dom_egtest.mm
+++ b/ios/chrome/browser/web/window_open_by_dom_egtest.mm
@@ -29,7 +29,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 {
@@ -66,8 +65,7 @@ NSString* GetBlockedPopupInfobarText(size_t blocked_count) {
[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);
}
@@ -89,8 +87,7 @@ NSString* GetBlockedPopupInfobarText(size_t blocked_count) {
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