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

Unified Diff: ios/web/shell/test/context_menu_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/web/shell/test/context_menu_egtest.mm
diff --git a/ios/web/shell/test/context_menu_egtest.mm b/ios/web/shell/test/context_menu_egtest.mm
index bc1e69e02c2ec77b78dd8450662188887c924f2a..3c19a9f31622d241705d6fab91e13bf944ab101a 100644
--- a/ios/web/shell/test/context_menu_egtest.mm
+++ b/ios/web/shell/test/context_menu_egtest.mm
@@ -26,7 +26,6 @@
using testing::ContextMenuItemWithText;
using testing::ElementToDismissContextMenu;
-using web::WebViewContainingText;
// Context menu test cases for the web shell.
@interface ContextMenuTestCase : WebShellTestCase
@@ -52,8 +51,7 @@ using web::WebViewContainingText;
web::test::SetUpSimpleHttpServer(responses);
[ShellEarlGrey loadURL:initialURL];
- [[EarlGrey selectElementWithMatcher:WebViewContainingText(linkText)]
- assertWithMatcher:grey_notNil()];
+ [ShellEarlGrey waitForWebViewContainingText:linkText];
[[EarlGrey selectElementWithMatcher:web::WebView()]
performAction:web::LongPressElementForContextMenu(
@@ -92,8 +90,7 @@ using web::WebViewContainingText;
web::test::SetUpSimpleHttpServer(responses);
[ShellEarlGrey loadURL:initialURL];
- [[EarlGrey selectElementWithMatcher:WebViewContainingText(linkText)]
- assertWithMatcher:grey_notNil()];
+ [ShellEarlGrey waitForWebViewContainingText:linkText];
[[EarlGrey selectElementWithMatcher:web::WebView()]
performAction:web::LongPressElementForContextMenu(
@@ -126,8 +123,7 @@ using web::WebViewContainingText;
web::test::SetUpSimpleHttpServer(responses);
[ShellEarlGrey loadURL:initialURL];
- [[EarlGrey selectElementWithMatcher:WebViewContainingText(linkText)]
- assertWithMatcher:grey_notNil()];
+ [ShellEarlGrey waitForWebViewContainingText:linkText];
[[EarlGrey selectElementWithMatcher:web::WebView()]
performAction:web::LongPressElementForContextMenu(
@@ -161,8 +157,7 @@ using web::WebViewContainingText;
web::test::SetUpSimpleHttpServer(responses);
[ShellEarlGrey loadURL:initialURL];
- [[EarlGrey selectElementWithMatcher:WebViewContainingText(linkText)]
- assertWithMatcher:grey_notNil()];
+ [ShellEarlGrey waitForWebViewContainingText:linkText];
[[EarlGrey selectElementWithMatcher:web::WebView()]
performAction:web::LongPressElementForContextMenu(

Powered by Google App Engine
This is Rietveld 408576698