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

Unified Diff: ios/chrome/browser/metrics/tab_usage_recorder_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/metrics/tab_usage_recorder_egtest.mm
diff --git a/ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm b/ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm
index 58a7b3678c3d9814ee5a083336f65ad9663083b1..5d1646aa06e90c5b2e246ff2539f510b3ceb0494 100644
--- a/ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm
+++ b/ios/chrome/browser/metrics/tab_usage_recorder_egtest.mm
@@ -179,16 +179,14 @@ void SwitchToNormalMode() {
// Leave the tab switcher.
CloseTabSwitcher();
} else {
- [[EarlGrey selectElementWithMatcher:
- chrome_test_util::ButtonWithAccessibilityLabelId(
- IDS_IOS_TOOLBAR_SHOW_TABS)] performAction:grey_tap()];
+ [[EarlGrey selectElementWithMatcher:chrome_test_util::ShowTabsButton()]
+ performAction:grey_tap()];
[[EarlGrey selectElementWithMatcher:
chrome_test_util::ButtonWithAccessibilityLabelId(
IDS_IOS_TOOLS_MENU_NEW_INCOGNITO_TAB)]
performAction:grey_swipeSlowInDirection(kGREYDirectionRight)];
- [[EarlGrey selectElementWithMatcher:
- chrome_test_util::ButtonWithAccessibilityLabelId(
- IDS_IOS_TOOLBAR_SHOW_TABS)] performAction:grey_tap()];
+ [[EarlGrey selectElementWithMatcher:chrome_test_util::ShowTabsButton()]
+ performAction:grey_tap()];
}
ConditionBlock condition = ^bool {
return !chrome_test_util::IsIncognitoMode();
@@ -235,9 +233,7 @@ void OpenSettingsMenuUnsynced() {
// iPhone).
void SelectTabUsingUI(NSString* title) {
if (IsCompact()) {
- WaitAndTap(chrome_test_util::ButtonWithAccessibilityLabelId(
- IDS_IOS_TOOLBAR_SHOW_TABS),
- @"Tab switcher");
+ WaitAndTap(chrome_test_util::ShowTabsButton(), @"Tab switcher");
}
WaitAndTap(grey_text(title),
[NSString stringWithFormat:@"tab with title %@", title]);
@@ -860,8 +856,7 @@ void SelectTabUsingUI(NSString* title) {
performAction:grey_longPress()];
[[EarlGrey
- selectElementWithMatcher:grey_text(l10n_util::GetNSString(
- IDS_IOS_CONTENT_CONTEXT_OPENLINKNEWTAB))]
+ selectElementWithMatcher:chrome_test_util::OpenLinkInNewTabMenuItem()]
performAction:grey_tap()];
chrome_test_util::AssertMainTabCount(numberOfTabs + 1);
« no previous file with comments | « ios/chrome/browser/context_menu/context_menu_egtest.mm ('k') | ios/chrome/browser/ui/history/history_ui_egtest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698