Chromium Code Reviews| Index: ios/chrome/browser/context_menu/context_menu_egtest.mm |
| diff --git a/ios/chrome/browser/context_menu/context_menu_egtest.mm b/ios/chrome/browser/context_menu/context_menu_egtest.mm |
| index 738ceb3e147cd22933664ec705cc2773a2fa2dd0..f3182369de66dedd3f75104e5fa019c1e9cd7be0 100644 |
| --- a/ios/chrome/browser/context_menu/context_menu_egtest.mm |
| +++ b/ios/chrome/browser/context_menu/context_menu_egtest.mm |
| @@ -56,12 +56,6 @@ id<GREYMatcher> OpenImageInNewTabButton() { |
| IDS_IOS_CONTENT_CONTEXT_OPENIMAGENEWTAB); |
| } |
| -// Matcher for the open link in new tab button in the context menu. |
| -// TODO(crbug.com/638674): Clean up code duplication. |
| -id<GREYMatcher> OpenLinkInNewTabButton() { |
| - return ButtonWithAccessibilityLabelId(IDS_IOS_CONTENT_CONTEXT_OPENLINKNEWTAB); |
| -} |
| - |
| // Waits for the context menu item to disappear. TODO(crbug.com/682871): Remove |
| // this once EarlGrey is synchronized with context menu. |
| void WaitForContextMenuItemDisappeared(id<GREYMatcher> contextMenuItemButton) { |
| @@ -180,7 +174,8 @@ void SelectTabAtIndexInCurrentMode(NSUInteger index) { |
| [ChromeEarlGrey loadURL:initialURL]; |
| chrome_test_util::AssertMainTabCount(1U); |
| - LongPressElementAndTapOnButton(kDestinationLinkID, OpenLinkInNewTabButton()); |
| + LongPressElementAndTapOnButton(kDestinationLinkID, |
| + chrome_test_util::OpenLinkInNewTabMenuItem()); |
|
Eugene But (OOO till 7-30)
2017/03/06 20:10:04
Optional nit: do you want to add using chrome_test
baxley
2017/03/06 20:53:34
I left it as is, since the using makes it more tha
|
| SelectTabAtIndexInCurrentMode(1U); |
| @@ -222,7 +217,8 @@ void SelectTabAtIndexInCurrentMode(NSUInteger index) { |
| kDestinationLinkID)] |
| assertWithMatcher:grey_notNil()]; |
| - LongPressElementAndTapOnButton(kDestinationLinkID, OpenLinkInNewTabButton()); |
| + LongPressElementAndTapOnButton(kDestinationLinkID, |
| + chrome_test_util::OpenLinkInNewTabMenuItem()); |
| // Earl Grey cannot preperly synchronize some animations, so adding a |
| // WaitUntilCondition to wait for the new tab opening animation to finish |