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

Unified Diff: ios/web/shell/test/context_menu_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/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 06c84caa1a3bd6ccd47975a086c3b25f3eaa4751..6cad3df670f4bfaecbb53fb176aada139ed49fdc 100644
--- a/ios/web/shell/test/context_menu_egtest.mm
+++ b/ios/web/shell/test/context_menu_egtest.mm
@@ -24,9 +24,9 @@
#error "This file requires ARC support."
#endif
+using base::SysUTF8ToNSString;
using testing::ContextMenuItemWithText;
using testing::ElementToDismissContextMenu;
-using web::WebViewContainingText;
// Context menu test cases for the web shell.
@interface ContextMenuTestCase : WebShellTestCase
@@ -52,8 +52,7 @@ using web::WebViewContainingText;
web::test::SetUpSimpleHttpServer(responses);
[ShellEarlGrey loadURL:initialURL];
- [[EarlGrey selectElementWithMatcher:WebViewContainingText(linkText)]
- assertWithMatcher:grey_notNil()];
+ [ShellEarlGrey waitForWebViewContainingText:SysUTF8ToNSString(linkText)];
[[EarlGrey selectElementWithMatcher:web::WebView()]
performAction:web::LongPressElementForContextMenu(
@@ -92,8 +91,7 @@ using web::WebViewContainingText;
web::test::SetUpSimpleHttpServer(responses);
[ShellEarlGrey loadURL:initialURL];
- [[EarlGrey selectElementWithMatcher:WebViewContainingText(linkText)]
- assertWithMatcher:grey_notNil()];
+ [ShellEarlGrey waitForWebViewContainingText:SysUTF8ToNSString(linkText)];
[[EarlGrey selectElementWithMatcher:web::WebView()]
performAction:web::LongPressElementForContextMenu(
@@ -126,8 +124,7 @@ using web::WebViewContainingText;
web::test::SetUpSimpleHttpServer(responses);
[ShellEarlGrey loadURL:initialURL];
- [[EarlGrey selectElementWithMatcher:WebViewContainingText(linkText)]
- assertWithMatcher:grey_notNil()];
+ [ShellEarlGrey waitForWebViewContainingText:SysUTF8ToNSString(linkText)];
[[EarlGrey selectElementWithMatcher:web::WebView()]
performAction:web::LongPressElementForContextMenu(
@@ -161,8 +158,7 @@ using web::WebViewContainingText;
web::test::SetUpSimpleHttpServer(responses);
[ShellEarlGrey loadURL:initialURL];
- [[EarlGrey selectElementWithMatcher:WebViewContainingText(linkText)]
- assertWithMatcher:grey_notNil()];
+ [ShellEarlGrey waitForWebViewContainingText:SysUTF8ToNSString(linkText)];
[[EarlGrey selectElementWithMatcher:web::WebView()]
performAction:web::LongPressElementForContextMenu(

Powered by Google App Engine
This is Rietveld 408576698