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

Unified Diff: ios/web/shell/test/context_menu_egtest.mm

Issue 2642193012: Make EarlGrey matchers compliant with Chromium style. (Closed)
Patch Set: build.gn and rebase Created 3 years, 11 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 cc1d25bc6c95f66ef73707333e0165301038f04d..5484c5aebb6c79690c1be0740d0a56bb2bbc7896 100644
--- a/ios/web/shell/test/context_menu_egtest.mm
+++ b/ios/web/shell/test/context_menu_egtest.mm
@@ -24,8 +24,8 @@
#error "This file requires ARC support."
#endif
-using testing::contextMenuItemWithText;
-using testing::elementToDismissContextMenu;
+using testing::ContextMenuItemWithText;
+using testing::ElementToDismissContextMenu;
// Context menu test cases for the web shell.
@interface ContextMenuTestCase : ShellBaseTestCase
@@ -57,18 +57,18 @@ using testing::elementToDismissContextMenu;
web::test::SetUpSimpleHttpServer(responses);
[ShellEarlGrey loadURL:initialURL];
- [[EarlGrey selectElementWithMatcher:web::webView()]
+ [[EarlGrey selectElementWithMatcher:web::WebView()]
performAction:web::longPressElementForContextMenu(
linkID, true /* menu should appear */)];
- id<GREYMatcher> copyItem = contextMenuItemWithText(@"Copy Link");
+ id<GREYMatcher> copyItem = ContextMenuItemWithText(@"Copy Link");
// Context menu should have a "copy link" item.
[[EarlGrey selectElementWithMatcher:copyItem]
assertWithMatcher:grey_notNil()];
// Dismiss the context menu.
- [[EarlGrey selectElementWithMatcher:elementToDismissContextMenu(@"Cancel")]
+ [[EarlGrey selectElementWithMatcher:ElementToDismissContextMenu(@"Cancel")]
performAction:grey_tap()];
// Context menu should go away after the tap.
@@ -102,11 +102,11 @@ using testing::elementToDismissContextMenu;
web::test::SetUpSimpleHttpServer(responses);
[ShellEarlGrey loadURL:initialURL];
- [[EarlGrey selectElementWithMatcher:web::webView()]
+ [[EarlGrey selectElementWithMatcher:web::WebView()]
performAction:web::longPressElementForContextMenu(
linkID, false /* menu shouldn't appear */)];
- id<GREYMatcher> copyItem = contextMenuItemWithText(@"Copy Link");
+ id<GREYMatcher> copyItem = ContextMenuItemWithText(@"Copy Link");
// Verify no context menu.
[[EarlGrey selectElementWithMatcher:copyItem] assertWithMatcher:grey_nil()];
@@ -141,11 +141,11 @@ using testing::elementToDismissContextMenu;
web::test::SetUpSimpleHttpServer(responses);
[ShellEarlGrey loadURL:initialURL];
- [[EarlGrey selectElementWithMatcher:web::webView()]
+ [[EarlGrey selectElementWithMatcher:web::WebView()]
performAction:web::longPressElementForContextMenu(
linkID, false /* menu shouldn't appear */)];
- id<GREYMatcher> copyItem = contextMenuItemWithText(@"Copy Link");
+ id<GREYMatcher> copyItem = ContextMenuItemWithText(@"Copy Link");
// Verify no context menu.
[[EarlGrey selectElementWithMatcher:copyItem] assertWithMatcher:grey_nil()];
@@ -181,18 +181,18 @@ using testing::elementToDismissContextMenu;
web::test::SetUpSimpleHttpServer(responses);
[ShellEarlGrey loadURL:initialURL];
- [[EarlGrey selectElementWithMatcher:web::webView()]
+ [[EarlGrey selectElementWithMatcher:web::WebView()]
performAction:web::longPressElementForContextMenu(
linkID, true /* menu should appear */)];
- id<GREYMatcher> copyItem = contextMenuItemWithText(@"Copy Link");
+ id<GREYMatcher> copyItem = ContextMenuItemWithText(@"Copy Link");
// Context menu should have a "copy link" item.
[[EarlGrey selectElementWithMatcher:copyItem]
assertWithMatcher:grey_notNil()];
// Dismiss the context menu.
- [[EarlGrey selectElementWithMatcher:elementToDismissContextMenu(@"Cancel")]
+ [[EarlGrey selectElementWithMatcher:ElementToDismissContextMenu(@"Cancel")]
performAction:grey_tap()];
// Context menu should go away after the tap.
« no previous file with comments | « ios/web/public/test/earl_grey/web_view_matchers.mm ('k') | ios/web/shell/test/earl_grey/shell_base_test_case.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698