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

Unified Diff: ios/chrome/browser/ui/history/history_ui_egtest.mm

Issue 2732973003: Use shared matchers for common elements. (Closed)
Patch Set: clean up format with using Created 3 years, 9 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/ui/history/history_ui_egtest.mm
diff --git a/ios/chrome/browser/ui/history/history_ui_egtest.mm b/ios/chrome/browser/ui/history/history_ui_egtest.mm
index 02c6255542d3645a8423731661348401be7c8ef9..25442e63258f8c3d15ba2d5de0b6c00d5c782935 100644
--- a/ios/chrome/browser/ui/history/history_ui_egtest.mm
+++ b/ios/chrome/browser/ui/history/history_ui_egtest.mm
@@ -42,6 +42,7 @@
#endif
using chrome_test_util::ButtonWithAccessibilityLabelId;
+using chrome_test_util::OpenLinkInNewTabMenuItem;
using chrome_test_util::WebViewContainingText;
namespace {
@@ -115,10 +116,6 @@ id<GREYMatcher> OpenClearBrowsingDataButton() {
return ButtonWithAccessibilityLabelId(
IDS_HISTORY_OPEN_CLEAR_BROWSING_DATA_DIALOG);
}
-// Matcher for the Open in New Tab option in the context menu.
-id<GREYMatcher> OpenInNewTabButton() {
- return ButtonWithAccessibilityLabelId(IDS_IOS_CONTENT_CONTEXT_OPENLINKNEWTAB);
-}
// Matcher for the Open in New Incognito Tab option in the context menu.
id<GREYMatcher> OpenInNewIncognitoTabButton() {
return ButtonWithAccessibilityLabelId(
@@ -430,7 +427,7 @@ void MockSignIn() {
// Select "Open in New Tab" and confirm that new tab is opened with selected
// URL.
- [[EarlGrey selectElementWithMatcher:OpenInNewTabButton()]
+ [[EarlGrey selectElementWithMatcher:OpenLinkInNewTabMenuItem()]
performAction:grey_tap()];
[[EarlGrey selectElementWithMatcher:chrome_test_util::OmniboxText(
_URL1.GetContent())]
« no previous file with comments | « ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm ('k') | ios/chrome/browser/ui/ntp/new_tab_page_egtest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698