Migrate to @interface and @impl ChromeMatchers for chrome_matchers.h/mm

Bug: 922813
Change-Id: Ia2e2ab97c670ea174981544e5ec5c38abca71b15
Reviewed-on: https://chromium-review.googlesource.com/c/1419039
Commit-Queue: Lindsay Pasricha <lindsayw@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#631091}
diff --git a/ios/chrome/test/earl_grey/BUILD.gn b/ios/chrome/test/earl_grey/BUILD.gn
index 54f38a1..93a8c08 100644
--- a/ios/chrome/test/earl_grey/BUILD.gn
+++ b/ios/chrome/test/earl_grey/BUILD.gn
@@ -221,6 +221,8 @@
     "chrome_earl_grey_ui.mm",
     "chrome_matchers.h",
     "chrome_matchers.mm",
+    "chrome_matchers_shorthand.h",
+    "chrome_matchers_shorthand.mm",
     "chrome_test_case.h",
     "chrome_test_case.mm",
   ]
diff --git a/ios/chrome/test/earl_grey/chrome_matchers.h b/ios/chrome/test/earl_grey/chrome_matchers.h
index 6173d1b..ba879f7 100644
--- a/ios/chrome/test/earl_grey/chrome_matchers.h
+++ b/ios/chrome/test/earl_grey/chrome_matchers.h
@@ -9,259 +9,262 @@
 
 #include <string>
 
+#import "ios/chrome/test/earl_grey/chrome_matchers_shorthand.h"
+
 @protocol GREYMatcher;
 
-namespace chrome_test_util {
-
-// Matcher for element with accessibility label corresponding to |message_id|
-// and accessibility trait UIAccessibilityTraitButton.
-id<GREYMatcher> ButtonWithAccessibilityLabelId(int message_id);
+@interface ChromeMatchers : NSObject
 
 // Matcher for element with accessibility label corresponding to |label| and
 // accessibility trait UIAccessibilityTraitButton.
-id<GREYMatcher> ButtonWithAccessibilityLabel(NSString* label);
++ (id<GREYMatcher>)buttonWithAccessibilityLabel:(NSString*)label;
 
-// Matcher for element with an image corresponding to |image_id|.
-id<GREYMatcher> ImageViewWithImage(int image_id);
+// Matcher for element with accessibility label corresponding to |messageId|
+// and accessibility trait UIAccessibilityTraitButton.
++ (id<GREYMatcher>)buttonWithAccessibilityLabelId:(int)messageId;
+
+// Matcher for element with an image corresponding to |imageId|.
++ (id<GREYMatcher>)imageViewWithImage:(int)imageId;
 
 // Matcher for element with an image defined by its name in the main bundle.
-id<GREYMatcher> ImageViewWithImageNamed(NSString* imageName);
++ (id<GREYMatcher>)imageViewWithImageNamed:(NSString*)imageName;
 
-// Matcher for element with an image corresponding to |image_id| and
+// Matcher for element with an image corresponding to |imageId| and
 // accessibility trait UIAccessibilityTraitButton.
-id<GREYMatcher> ButtonWithImage(int image_id);
++ (id<GREYMatcher>)buttonWithImage:(int)imageId;
 
-// Matcher for element with accessibility label corresponding to |message_id|
+// Matcher for element with accessibility label corresponding to |messageId|
 // and accessibility trait UIAccessibilityTraitStaticText.
-id<GREYMatcher> StaticTextWithAccessibilityLabelId(int message_id);
++ (id<GREYMatcher>)staticTextWithAccessibilityLabelId:(int)messageId;
 
 // Matcher for element with accessibility label corresponding to |label| and
 // accessibility trait UIAccessibilityTraitStaticText.
-id<GREYMatcher> StaticTextWithAccessibilityLabel(NSString* label);
++ (id<GREYMatcher>)staticTextWithAccessibilityLabel:(NSString*)label;
 
-// Matcher for element with accessibility label corresponding to |message_id|
+// Matcher for element with accessibility label corresponding to |messageId|
 // and accessibility trait UIAccessibilityTraitHeader.
-id<GREYMatcher> HeaderWithAccessibilityLabelId(int message_id);
++ (id<GREYMatcher>)headerWithAccessibilityLabelId:(int)messageId;
 
 // Matcher for element with accessibility label corresponding to |label| and
 // accessibility trait UIAccessibilityTraitHeader.
-id<GREYMatcher> HeaderWithAccessibilityLabel(NSString* label);
++ (id<GREYMatcher>)headerWithAccessibilityLabel:(NSString*)label;
 
 // Returns matcher for a cancel button.
-id<GREYMatcher> CancelButton();
++ (id<GREYMatcher>)cancelButton;
 
 // Returns matcher for a close button.
-id<GREYMatcher> CloseButton();
++ (id<GREYMatcher>)closeButton;
 
 // Matcher for the navigate forward button.
-id<GREYMatcher> ForwardButton();
++ (id<GREYMatcher>)forwardButton;
 
 // Matcher for the navigate backward button.
-id<GREYMatcher> BackButton();
++ (id<GREYMatcher>)backButton;
 
 // Matcher for the reload button.
-id<GREYMatcher> ReloadButton();
++ (id<GREYMatcher>)reloadButton;
 
 // Matcher for the stop loading button.
-id<GREYMatcher> StopButton();
++ (id<GREYMatcher>)stopButton;
 
 // Returns a matcher for the omnibox.
-id<GREYMatcher> Omnibox();
++ (id<GREYMatcher>)omnibox;
 
 // Returns a matcher for the location view.
-id<GREYMatcher> DefocusedLocationView();
++ (id<GREYMatcher>)defocusedLocationView;
 
 // Returns a matcher for the page security info button.
-id<GREYMatcher> PageSecurityInfoButton();
++ (id<GREYMatcher>)pageSecurityInfoButton;
+
 // Returns a matcher for the page security info indicator.
-id<GREYMatcher> PageSecurityInfoIndicator();
++ (id<GREYMatcher>)pageSecurityInfoIndicator;
 
 // Returns matcher for omnibox containing |text|. Performs an exact match of the
 // omnibox contents.
-id<GREYMatcher> OmniboxText(std::string text);
++ (id<GREYMatcher>)omniboxText:(std::string)text;
 
 // Returns matcher for |text| being a substring of the text in the omnibox.
-id<GREYMatcher> OmniboxContainingText(std::string text);
++ (id<GREYMatcher>)omniboxContainingText:(std::string)text;
 
 // Returns matcher for |text| being a substring of the text in the location
 // view.
-id<GREYMatcher> LocationViewContainingText(std::string text);
++ (id<GREYMatcher>)locationViewContainingText:(std::string)text;
 
 // Matcher for Tools menu button.
-id<GREYMatcher> ToolsMenuButton();
++ (id<GREYMatcher>)toolsMenuButton;
 
 // Matcher for the Share menu button.
-id<GREYMatcher> ShareButton();
++ (id<GREYMatcher>)shareButton;
 
 // Returns the GREYMatcher for the button that opens the tab switcher.
-id<GREYMatcher> TabletTabSwitcherOpenButton();
++ (id<GREYMatcher>)tabletTabSwitcherOpenButton;
 
 // Matcher for show tabs button.
-id<GREYMatcher> ShowTabsButton();
++ (id<GREYMatcher>)showTabsButton;
 
 // Matcher for SettingsSwitchCell.
-id<GREYMatcher> SettingsSwitchCell(NSString* accessibility_identifier,
-                                   BOOL is_toggled_on);
++ (id<GREYMatcher>)settingsSwitchCell:(NSString*)accessibilityIdentifier
+                          isToggledOn:(BOOL)isToggledOn;
 
 // Matcher for SettingsSwitchCell.
-id<GREYMatcher> SettingsSwitchCell(NSString* accessibility_identifier,
-                                   BOOL is_toggled_on,
-                                   BOOL is_enabled);
++ (id<GREYMatcher>)settingsSwitchCell:(NSString*)accessibilityIdentifier
+                          isToggledOn:(BOOL)isToggledOn
+                            isEnabled:(BOOL)isEnabled;
 
 // Matcher for SyncSwitchCell.
-id<GREYMatcher> SyncSwitchCell(NSString* accessibility_label,
-                               BOOL is_toggled_on);
++ (id<GREYMatcher>)syncSwitchCell:(NSString*)accessibilityLabel
+                      isToggledOn:(BOOL)isToggledOn;
 
 // Matcher for the Open in New Tab option in the context menu when long pressing
 // a link.
-id<GREYMatcher> OpenLinkInNewTabButton();
++ (id<GREYMatcher>)openLinkInNewTabButton;
 
 // Matcher for the done button on the navigation bar.
-id<GREYMatcher> NavigationBarDoneButton();
++ (id<GREYMatcher>)navigationBarDoneButton;
 
 // Matcher for the done button on the Bookmarks navigation bar.
-id<GREYMatcher> BookmarksNavigationBarDoneButton();
++ (id<GREYMatcher>)bookmarksNavigationBarDoneButton;
 
 // Returns matcher for the account consistency setup signin button.
-id<GREYMatcher> AccountConsistencySetupSigninButton();
++ (id<GREYMatcher>)accountConsistencySetupSigninButton;
 
 // Returns matcher for the account consistency confirmation button.
-id<GREYMatcher> AccountConsistencyConfirmationOkButton();
++ (id<GREYMatcher>)accountConsistencyConfirmationOkButton;
 
 // Returns matcher for the add account accounts button.
-id<GREYMatcher> AddAccountButton();
++ (id<GREYMatcher>)addAccountButton;
 
 // Returns matcher for the sign out accounts button.
-id<GREYMatcher> SignOutAccountsButton();
++ (id<GREYMatcher>)signOutAccountsButton;
 
 // Returns matcher for the Clear Browsing Data cell on the Privacy screen.
-id<GREYMatcher> ClearBrowsingDataCell();
++ (id<GREYMatcher>)clearBrowsingDataCell;
 
 // Returns matcher for the clear browsing data button on the clear browsing data
 // panel.
-id<GREYMatcher> ClearBrowsingDataButton();
++ (id<GREYMatcher>)clearBrowsingDataButton;
 
 // Returns matcher for the clear browsing data collection view.
-id<GREYMatcher> ClearBrowsingDataCollectionView();
++ (id<GREYMatcher>)clearBrowsingDataCollectionView;
 
 // Matcher for the clear browsing data action sheet item.
-id<GREYMatcher> ConfirmClearBrowsingDataButton();
++ (id<GREYMatcher>)confirmClearBrowsingDataButton;
 
 // Returns matcher for the settings button in the tools menu.
-id<GREYMatcher> SettingsMenuButton();
++ (id<GREYMatcher>)settingsMenuButton;
 
 // Returns matcher for the "Done" button in the settings' navigation bar.
-id<GREYMatcher> SettingsDoneButton();
++ (id<GREYMatcher>)settingsDoneButton;
 
 // Returns matcher for the tools menu table view.
-id<GREYMatcher> ToolsMenuView();
++ (id<GREYMatcher>)toolsMenuView;
 
 // Returns matcher for the OK button.
-id<GREYMatcher> OKButton();
++ (id<GREYMatcher>)okButton;
 
 // Returns matcher for the primary button in the sign-in promo view. This is
 // "Sign in into Chrome" button for a cold state, or "Continue as John Doe" for
 // a warm state.
-id<GREYMatcher> PrimarySignInButton();
++ (id<GREYMatcher>)primarySignInButton;
 
 // Returns matcher for the secondary button in the sign-in promo view. This is
 // "Not johndoe@example.com" button.
-id<GREYMatcher> SecondarySignInButton();
++ (id<GREYMatcher>)secondarySignInButton;
 
 // Returns matcher for the button for the currently signed in account in the
 // settings menu.
-id<GREYMatcher> SettingsAccountButton();
++ (id<GREYMatcher>)settingsAccountButton;
 
 // Returns matcher for the accounts collection view.
-id<GREYMatcher> SettingsAccountsCollectionView();
++ (id<GREYMatcher>)settingsAccountsCollectionView;
 
 // Returns matcher for the Import Data cell in switch sync account view.
-id<GREYMatcher> SettingsImportDataImportButton();
++ (id<GREYMatcher>)settingsImportDataImportButton;
 
 // Returns matcher for the Keep Data Separate cell in switch sync account view.
-id<GREYMatcher> SettingsImportDataKeepSeparateButton();
++ (id<GREYMatcher>)settingsImportDataKeepSeparateButton;
 
 // Returns matcher for the Manage Synced Data button in sync setting view.
-id<GREYMatcher> SettingsSyncManageSyncedDataButton();
++ (id<GREYMatcher>)settingsSyncManageSyncedDataButton;
 
 // Returns matcher for the menu button to sync accounts.
-id<GREYMatcher> AccountsSyncButton();
++ (id<GREYMatcher>)accountsSyncButton;
 
 // Returns matcher for the Content Settings button on the main Settings screen.
-id<GREYMatcher> ContentSettingsButton();
++ (id<GREYMatcher>)contentSettingsButton;
 
 // Returns matcher for the Google Services Settings button on the main Settings
 // screen.
-id<GREYMatcher> GoogleServicesSettingsButton();
++ (id<GREYMatcher>)googleServicesSettingsButton;
 
 // Returns matcher for the back button on a settings menu.
-id<GREYMatcher> SettingsMenuBackButton();
++ (id<GREYMatcher>)settingsMenuBackButton;
 
 // Returns matcher for the Privacy cell on the main Settings screen.
-id<GREYMatcher> SettingsMenuPrivacyButton();
++ (id<GREYMatcher>)settingsMenuPrivacyButton;
 
 // Returns matcher for the Save passwords cell on the main Settings screen.
-id<GREYMatcher> SettingsMenuPasswordsButton();
++ (id<GREYMatcher>)settingsMenuPasswordsButton;
 
 // Returns matcher for the payment request collection view.
-id<GREYMatcher> PaymentRequestView();
++ (id<GREYMatcher>)paymentRequestView;
 
 // Returns matcher for the error confirmation view for payment request.
-id<GREYMatcher> PaymentRequestErrorView();
++ (id<GREYMatcher>)paymentRequestErrorView;
 
 // Returns matcher for the voice search button on the main Settings screen.
-id<GREYMatcher> VoiceSearchButton();
++ (id<GREYMatcher>)voiceSearchButton;
 
 // Returns matcher for the settings main menu view.
-id<GREYMatcher> SettingsCollectionView();
++ (id<GREYMatcher>)settingsCollectionView;
 
 // Returns matcher for the clear browsing history cell on the clear browsing
 // data panel.
-id<GREYMatcher> ClearBrowsingHistoryButton();
++ (id<GREYMatcher>)clearBrowsingHistoryButton;
 
 // Returns matcher for the clear cookies cell on the clear browsing data panel.
-id<GREYMatcher> ClearCookiesButton();
++ (id<GREYMatcher>)clearCookiesButton;
 
 // Returns matcher for the clear cache cell on the clear browsing data panel.
-id<GREYMatcher> ClearCacheButton();
++ (id<GREYMatcher>)clearCacheButton;
 
 // Returns matcher for the clear saved passwords cell on the clear browsing data
 // panel.
-id<GREYMatcher> ClearSavedPasswordsButton();
++ (id<GREYMatcher>)clearSavedPasswordsButton;
 
 // Returns matcher for the collection view of content suggestion.
-id<GREYMatcher> ContentSuggestionCollectionView();
++ (id<GREYMatcher>)contentSuggestionCollectionView;
 
 // Returns matcher for the warning message while filling in payment requests.
-id<GREYMatcher> WarningMessageView();
++ (id<GREYMatcher>)warningMessageView;
 
 // Returns matcher for the payment picker cell.
-id<GREYMatcher> PaymentRequestPickerRow();
++ (id<GREYMatcher>)paymentRequestPickerRow;
 
 // Returns matcher for the payment request search bar.
-id<GREYMatcher> PaymentRequestPickerSearchBar();
++ (id<GREYMatcher>)paymentRequestPickerSearchBar;
 
 // Returns matcher for the bookmarks button on the Tools menu.
-id<GREYMatcher> BookmarksMenuButton();
++ (id<GREYMatcher>)bookmarksMenuButton;
 
 // Returns matcher for the recent tabs button on the Tools menu.
-id<GREYMatcher> RecentTabsMenuButton();
++ (id<GREYMatcher>)recentTabsMenuButton;
 
 // Returns matcher for the system selection callout.
-id<GREYMatcher> SystemSelectionCallout();
++ (id<GREYMatcher>)systemSelectionCallout;
 
 // Returns matcher for the copy button on the system selection callout.
-id<GREYMatcher> SystemSelectionCalloutCopyButton();
++ (id<GREYMatcher>)systemSelectionCalloutCopyButton;
 
 // Returns matcher for the Copy item on the context menu.
-id<GREYMatcher> ContextMenuCopyButton();
++ (id<GREYMatcher>)contextMenuCopyButton;
 
 // Returns matcher for defoucesed omnibox on a new tab.
-id<GREYMatcher> NewTabPageOmnibox();
++ (id<GREYMatcher>)NTPOmnibox;
 
 // Returns a matcher for the current WebView.
-id<GREYMatcher> WebViewMatcher();
++ (id<GREYMatcher>)webViewMatcher;
 
-}  // namespace chrome_test_util
+@end
 
 #endif  // IOS_CHROME_TEST_EARL_GREY_CHROME_MATCHERS_H_
diff --git a/ios/chrome/test/earl_grey/chrome_matchers.mm b/ios/chrome/test/earl_grey/chrome_matchers.mm
index 46b2e3c..264f4f6 100644
--- a/ios/chrome/test/earl_grey/chrome_matchers.mm
+++ b/ios/chrome/test/earl_grey/chrome_matchers.mm
@@ -47,36 +47,35 @@
 
 namespace {
 
-id<GREYMatcher> SettingsSwitchIsToggledOn(BOOL is_toggled_on) {
+id<GREYMatcher> SettingsSwitchIsToggledOn(BOOL isToggledOn) {
   MatchesBlock matches = ^BOOL(id element) {
     SettingsSwitchCell* switch_cell =
         base::mac::ObjCCastStrict<SettingsSwitchCell>(element);
     UISwitch* switch_view = switch_cell.switchView;
-    return (switch_view.on && is_toggled_on) ||
-           (!switch_view.on && !is_toggled_on);
+    return (switch_view.on && isToggledOn) || (!switch_view.on && !isToggledOn);
   };
   DescribeToBlock describe = ^void(id<GREYDescription> description) {
     NSString* name =
         [NSString stringWithFormat:@"settingsSwitchToggledState(%@)",
-                                   is_toggled_on ? @"ON" : @"OFF"];
+                                   isToggledOn ? @"ON" : @"OFF"];
     [description appendText:name];
   };
   return [[GREYElementMatcherBlock alloc] initWithMatchesBlock:matches
                                               descriptionBlock:describe];
 }
 
-id<GREYMatcher> SettingsSwitchIsEnabled(BOOL is_enabled) {
+id<GREYMatcher> SettingsSwitchIsEnabled(BOOL isEnabled) {
   MatchesBlock matches = ^BOOL(id element) {
     SettingsSwitchCell* switch_cell =
         base::mac::ObjCCastStrict<SettingsSwitchCell>(element);
     UISwitch* switch_view = switch_cell.switchView;
-    return (switch_view.enabled && is_enabled) ||
-           (!switch_view.enabled && !is_enabled);
+    return (switch_view.enabled && isEnabled) ||
+           (!switch_view.enabled && !isEnabled);
   };
   DescribeToBlock describe = ^void(id<GREYDescription> description) {
     NSString* name =
         [NSString stringWithFormat:@"settingsSwitchEnabledState(%@)",
-                                   is_enabled ? @"YES" : @"NO"];
+                                   isEnabled ? @"YES" : @"NO"];
     [description appendText:name];
   };
   return [[GREYElementMatcherBlock alloc] initWithMatchesBlock:matches
@@ -101,132 +100,135 @@
 
 }  // namespace
 
-namespace chrome_test_util {
+@implementation ChromeMatchers
 
-id<GREYMatcher> ButtonWithAccessibilityLabel(NSString* label) {
++ (id<GREYMatcher>)buttonWithAccessibilityLabel:(NSString*)label {
   return grey_allOf(grey_accessibilityLabel(label),
                     grey_accessibilityTrait(UIAccessibilityTraitButton), nil);
 }
 
-id<GREYMatcher> ButtonWithAccessibilityLabelId(int message_id) {
-  return ButtonWithAccessibilityLabel(
-      l10n_util::GetNSStringWithFixup(message_id));
++ (id<GREYMatcher>)buttonWithAccessibilityLabelId:(int)messageId {
+  return [ChromeMatchers
+      buttonWithAccessibilityLabel:l10n_util::GetNSStringWithFixup(messageId)];
 }
 
-id<GREYMatcher> ImageViewWithImageNamed(NSString* imageName) {
-  UIImage* expected_image = [UIImage imageNamed:imageName];
++ (id<GREYMatcher>)imageViewWithImageNamed:(NSString*)imageName {
+  UIImage* expectedImage = [UIImage imageNamed:imageName];
   MatchesBlock matches = ^BOOL(UIImageView* imageView) {
-    return ui::test::uiimage_utils::UIImagesAreEqual(expected_image,
+    return ui::test::uiimage_utils::UIImagesAreEqual(expectedImage,
                                                      imageView.image);
   };
-  NSString* description_string =
+  NSString* descriptionString =
       [NSString stringWithFormat:@"Images matching image named %@", imageName];
   DescribeToBlock describe = ^(id<GREYDescription> description) {
-    [description appendText:description_string];
+    [description appendText:descriptionString];
   };
-  id<GREYMatcher> image_matcher =
+  id<GREYMatcher> imageMatcher =
       [[GREYElementMatcherBlock alloc] initWithMatchesBlock:matches
                                            descriptionBlock:describe];
-  return image_matcher;
+  return imageMatcher;
 }
 
-id<GREYMatcher> ImageViewWithImage(int image_id) {
-  UIImage* expected_image = NativeImage(image_id);
++ (id<GREYMatcher>)imageViewWithImage:(int)imageId {
+  UIImage* expectedImage = NativeImage(imageId);
   MatchesBlock matches = ^BOOL(UIImageView* imageView) {
-    return ui::test::uiimage_utils::UIImagesAreEqual(expected_image,
+    return ui::test::uiimage_utils::UIImagesAreEqual(expectedImage,
                                                      imageView.image);
   };
-  NSString* description_string =
-      [NSString stringWithFormat:@"Images matching %i", image_id];
+  NSString* descriptionString =
+      [NSString stringWithFormat:@"Images matching %i", imageId];
   DescribeToBlock describe = ^(id<GREYDescription> description) {
-    [description appendText:description_string];
+    [description appendText:descriptionString];
   };
-  id<GREYMatcher> image_matcher =
+  id<GREYMatcher> imageMatcher =
       [[GREYElementMatcherBlock alloc] initWithMatchesBlock:matches
                                            descriptionBlock:describe];
-  return image_matcher;
+  return imageMatcher;
 }
 
-id<GREYMatcher> ButtonWithImage(int image_id) {
-  UIImage* expected_image = NativeImage(image_id);
++ (id<GREYMatcher>)buttonWithImage:(int)imageId {
+  UIImage* expectedImage = NativeImage(imageId);
   MatchesBlock matches = ^BOOL(UIButton* button) {
-    return ui::test::uiimage_utils::UIImagesAreEqual(expected_image,
+    return ui::test::uiimage_utils::UIImagesAreEqual(expectedImage,
                                                      [button currentImage]);
   };
-  NSString* description_string =
-      [NSString stringWithFormat:@"Images matching %i", image_id];
+  NSString* descriptionString =
+      [NSString stringWithFormat:@"Images matching %i", imageId];
   DescribeToBlock describe = ^(id<GREYDescription> description) {
-    [description appendText:description_string];
+    [description appendText:descriptionString];
   };
-  id<GREYMatcher> image_matcher =
+  id<GREYMatcher> imageMatcher =
       [[GREYElementMatcherBlock alloc] initWithMatchesBlock:matches
                                            descriptionBlock:describe];
   return grey_allOf(grey_accessibilityTrait(UIAccessibilityTraitButton),
-                    image_matcher, nil);
+                    imageMatcher, nil);
 }
 
-id<GREYMatcher> StaticTextWithAccessibilityLabelId(int message_id) {
-  return StaticTextWithAccessibilityLabel(
-      l10n_util::GetNSStringWithFixup(message_id));
++ (id<GREYMatcher>)staticTextWithAccessibilityLabelId:(int)messageId {
+  return [ChromeMatchers
+      staticTextWithAccessibilityLabel:(l10n_util::GetNSStringWithFixup(
+                                           messageId))];
 }
 
-id<GREYMatcher> StaticTextWithAccessibilityLabel(NSString* label) {
++ (id<GREYMatcher>)staticTextWithAccessibilityLabel:(NSString*)label {
   return grey_allOf(grey_accessibilityLabel(label),
                     grey_accessibilityTrait(UIAccessibilityTraitStaticText),
                     nil);
 }
 
-id<GREYMatcher> HeaderWithAccessibilityLabelId(int message_id) {
-  return HeaderWithAccessibilityLabel(
-      l10n_util::GetNSStringWithFixup(message_id));
++ (id<GREYMatcher>)headerWithAccessibilityLabelId:(int)messageId {
+  return [ChromeMatchers
+      headerWithAccessibilityLabel:(l10n_util::GetNSStringWithFixup(
+                                       messageId))];
 }
 
-id<GREYMatcher> HeaderWithAccessibilityLabel(NSString* label) {
++ (id<GREYMatcher>)headerWithAccessibilityLabel:(NSString*)label {
   return grey_allOf(grey_accessibilityLabel(label),
                     grey_accessibilityTrait(UIAccessibilityTraitHeader), nil);
 }
 
-id<GREYMatcher> CancelButton() {
-  return ButtonWithAccessibilityLabelId(IDS_CANCEL);
++ (id<GREYMatcher>)cancelButton {
+  return [ChromeMatchers buttonWithAccessibilityLabelId:(IDS_CANCEL)];
 }
 
-id<GREYMatcher> CloseButton() {
-  return ButtonWithAccessibilityLabelId(IDS_CLOSE);
++ (id<GREYMatcher>)closeButton {
+  return [ChromeMatchers buttonWithAccessibilityLabelId:(IDS_CLOSE)];
 }
 
-id<GREYMatcher> ForwardButton() {
-  return ButtonWithAccessibilityLabelId(IDS_ACCNAME_FORWARD);
++ (id<GREYMatcher>)forwardButton {
+  return [ChromeMatchers buttonWithAccessibilityLabelId:(IDS_ACCNAME_FORWARD)];
 }
 
-id<GREYMatcher> BackButton() {
-  return ButtonWithAccessibilityLabelId(IDS_ACCNAME_BACK);
++ (id<GREYMatcher>)backButton {
+  return [ChromeMatchers buttonWithAccessibilityLabelId:(IDS_ACCNAME_BACK)];
 }
 
-id<GREYMatcher> ReloadButton() {
-  return ButtonWithAccessibilityLabelId(IDS_IOS_ACCNAME_RELOAD);
++ (id<GREYMatcher>)reloadButton {
+  return
+      [ChromeMatchers buttonWithAccessibilityLabelId:(IDS_IOS_ACCNAME_RELOAD)];
 }
 
-id<GREYMatcher> StopButton() {
-  return ButtonWithAccessibilityLabelId(IDS_IOS_ACCNAME_STOP);
++ (id<GREYMatcher>)stopButton {
+  return [ChromeMatchers buttonWithAccessibilityLabelId:(IDS_IOS_ACCNAME_STOP)];
 }
 
-id<GREYMatcher> Omnibox() {
++ (id<GREYMatcher>)omnibox {
   return grey_kindOfClass([OmniboxTextFieldIOS class]);
 }
 
-id<GREYMatcher> DefocusedLocationView() {
++ (id<GREYMatcher>)defocusedLocationView {
   return grey_kindOfClass([LocationBarSteadyView class]);
 }
 
-id<GREYMatcher> PageSecurityInfoButton() {
++ (id<GREYMatcher>)pageSecurityInfoButton {
   return grey_accessibilityLabel(@"Page Security Info");
 }
 
-id<GREYMatcher> PageSecurityInfoIndicator() {
++ (id<GREYMatcher>)pageSecurityInfoIndicator {
   return grey_accessibilityLabel(@"Page Security Info");
 }
 
-id<GREYMatcher> OmniboxText(std::string text) {
++ (id<GREYMatcher>)omniboxText:(std::string)text {
   GREYElementMatcherBlock* matcher = [GREYElementMatcherBlock
       matcherWithMatchesBlock:^BOOL(id element) {
         OmniboxTextFieldIOS* omnibox =
@@ -242,7 +244,7 @@
   return matcher;
 }
 
-id<GREYMatcher> OmniboxContainingText(std::string text) {
++ (id<GREYMatcher>)omniboxContainingText:(std::string)text {
   GREYElementMatcherBlock* matcher = [GREYElementMatcherBlock
       matcherWithMatchesBlock:^BOOL(UITextField* element) {
         return [element.text containsString:base::SysUTF8ToNSString(text)];
@@ -256,7 +258,7 @@
   return matcher;
 }
 
-id<GREYMatcher> LocationViewContainingText(std::string text) {
++ (id<GREYMatcher>)locationViewContainingText:(std::string)text {
   GREYElementMatcherBlock* matcher = [GREYElementMatcherBlock
       matcherWithMatchesBlock:^BOOL(LocationBarSteadyView* element) {
         return [element.locationLabel.text
@@ -272,161 +274,171 @@
   return matcher;
 }
 
-id<GREYMatcher> ToolsMenuButton() {
++ (id<GREYMatcher>)toolsMenuButton {
   return grey_allOf(grey_accessibilityID(kToolbarToolsMenuButtonIdentifier),
                     grey_sufficientlyVisible(), nil);
 }
 
-id<GREYMatcher> ShareButton() {
-  return grey_allOf(ButtonWithAccessibilityLabelId(IDS_IOS_TOOLS_MENU_SHARE),
-                    grey_sufficientlyVisible(), nil);
++ (id<GREYMatcher>)shareButton {
+  return grey_allOf(
+      [ChromeMatchers
+          buttonWithAccessibilityLabelId:(IDS_IOS_TOOLS_MENU_SHARE)],
+      grey_sufficientlyVisible(), nil);
 }
 
-id<GREYMatcher> TabletTabSwitcherOpenButton() {
-  return ButtonWithAccessibilityLabelId(IDS_IOS_TAB_STRIP_ENTER_TAB_SWITCHER);
++ (id<GREYMatcher>)tabletTabSwitcherOpenButton {
+  return [ChromeMatchers
+      buttonWithAccessibilityLabelId:(IDS_IOS_TAB_STRIP_ENTER_TAB_SWITCHER)];
 }
 
-id<GREYMatcher> ShowTabsButton() {
++ (id<GREYMatcher>)showTabsButton {
   return grey_allOf(grey_accessibilityID(kToolbarStackButtonIdentifier),
                     grey_sufficientlyVisible(), nil);
 }
 
-id<GREYMatcher> SettingsSwitchCell(NSString* accessibility_identifier,
-                                   BOOL is_toggled_on) {
-  return SettingsSwitchCell(accessibility_identifier, is_toggled_on, YES);
++ (id<GREYMatcher>)settingsSwitchCell:(NSString*)accessibilityIdentifier
+                          isToggledOn:(BOOL)isToggledOn {
+  return [ChromeMatchers settingsSwitchCell:accessibilityIdentifier
+                                isToggledOn:isToggledOn
+                                  isEnabled:YES];
 }
 
-id<GREYMatcher> SettingsSwitchCell(NSString* accessibility_identifier,
-                                   BOOL is_toggled_on,
-                                   BOOL is_enabled) {
-  return grey_allOf(grey_accessibilityID(accessibility_identifier),
-                    SettingsSwitchIsToggledOn(is_toggled_on),
-                    SettingsSwitchIsEnabled(is_enabled),
++ (id<GREYMatcher>)settingsSwitchCell:(NSString*)accessibilityIdentifier
+                          isToggledOn:(BOOL)isToggledOn
+                            isEnabled:(BOOL)isEnabled {
+  return grey_allOf(grey_accessibilityID(accessibilityIdentifier),
+                    SettingsSwitchIsToggledOn(isToggledOn),
+                    SettingsSwitchIsEnabled(isEnabled),
                     grey_sufficientlyVisible(), nil);
 }
 
-id<GREYMatcher> SyncSwitchCell(NSString* accessibility_label,
-                               BOOL is_toggled_on) {
++ (id<GREYMatcher>)syncSwitchCell:(NSString*)accessibilityLabel
+                      isToggledOn:(BOOL)isToggledOn {
   return grey_allOf(
-      grey_accessibilityLabel(accessibility_label),
+      grey_accessibilityLabel(accessibilityLabel),
       grey_accessibilityValue(
-          is_toggled_on ? l10n_util::GetNSString(IDS_IOS_SETTING_ON)
-                        : l10n_util::GetNSString(IDS_IOS_SETTING_OFF)),
+          isToggledOn ? l10n_util::GetNSString(IDS_IOS_SETTING_ON)
+                      : l10n_util::GetNSString(IDS_IOS_SETTING_OFF)),
       grey_sufficientlyVisible(), nil);
 }
 
-id<GREYMatcher> OpenLinkInNewTabButton() {
-  return ButtonWithAccessibilityLabelId(IDS_IOS_CONTENT_CONTEXT_OPENLINKNEWTAB);
++ (id<GREYMatcher>)openLinkInNewTabButton {
+  return [ChromeMatchers
+      buttonWithAccessibilityLabelId:(IDS_IOS_CONTENT_CONTEXT_OPENLINKNEWTAB)];
 }
 
-id<GREYMatcher> NavigationBarDoneButton() {
++ (id<GREYMatcher>)navigationBarDoneButton {
   return grey_allOf(
-      ButtonWithAccessibilityLabelId(IDS_IOS_NAVIGATION_BAR_DONE_BUTTON),
+      [ChromeMatchers
+          buttonWithAccessibilityLabelId:(IDS_IOS_NAVIGATION_BAR_DONE_BUTTON)],
       grey_userInteractionEnabled(), nil);
 }
 
-id<GREYMatcher> BookmarksNavigationBarDoneButton() {
++ (id<GREYMatcher>)bookmarksNavigationBarDoneButton {
   return grey_accessibilityID(kBookmarkHomeNavigationBarDoneButtonIdentifier);
 }
 
-id<GREYMatcher> AccountConsistencySetupSigninButton() {
-  return ButtonWithAccessibilityLabelId(
-      IDS_IOS_ACCOUNT_CONSISTENCY_SETUP_SIGNIN_BUTTON);
++ (id<GREYMatcher>)accountConsistencySetupSigninButton {
+  return [ChromeMatchers buttonWithAccessibilityLabelId:
+                             (IDS_IOS_ACCOUNT_CONSISTENCY_SETUP_SIGNIN_BUTTON)];
 }
 
-id<GREYMatcher> AccountConsistencyConfirmationOkButton() {
++ (id<GREYMatcher>)accountConsistencyConfirmationOkButton {
   int labelID = base::FeatureList::IsEnabled(unified_consent::kUnifiedConsent)
                     ? IDS_IOS_ACCOUNT_UNIFIED_CONSENT_OK_BUTTON
                     : IDS_IOS_ACCOUNT_CONSISTENCY_CONFIRMATION_OK_BUTTON;
-  return ButtonWithAccessibilityLabelId(labelID);
+  return [ChromeMatchers buttonWithAccessibilityLabelId:(labelID)];
 }
 
-id<GREYMatcher> AddAccountButton() {
++ (id<GREYMatcher>)addAccountButton {
   return grey_accessibilityID(kSettingsAccountsTableViewAddAccountCellId);
 }
 
-id<GREYMatcher> SignOutAccountsButton() {
++ (id<GREYMatcher>)signOutAccountsButton {
   return grey_accessibilityID(kSettingsAccountsTableViewSignoutCellId);
 }
 
-id<GREYMatcher> ClearBrowsingDataCell() {
-  return ButtonWithAccessibilityLabelId(IDS_IOS_CLEAR_BROWSING_DATA_TITLE);
++ (id<GREYMatcher>)clearBrowsingDataCell {
+  return [ChromeMatchers
+      buttonWithAccessibilityLabelId:(IDS_IOS_CLEAR_BROWSING_DATA_TITLE)];
 }
 
-id<GREYMatcher> ClearBrowsingDataButton() {
-  return ButtonWithAccessibilityLabelId(IDS_IOS_CLEAR_BUTTON);
++ (id<GREYMatcher>)clearBrowsingDataButton {
+  return [ChromeMatchers buttonWithAccessibilityLabelId:(IDS_IOS_CLEAR_BUTTON)];
 }
 
-id<GREYMatcher> ClearBrowsingDataCollectionView() {
++ (id<GREYMatcher>)clearBrowsingDataCollectionView {
   return grey_accessibilityID(
       kClearBrowsingDataCollectionViewAccessibilityIdentifier);
 }
 
-id<GREYMatcher> ConfirmClearBrowsingDataButton() {
++ (id<GREYMatcher>)confirmClearBrowsingDataButton {
   return grey_allOf(
       grey_accessibilityLabel(l10n_util::GetNSString(IDS_IOS_CLEAR_BUTTON)),
       grey_accessibilityTrait(UIAccessibilityTraitButton),
       grey_not(grey_accessibilityID(kClearBrowsingDataButtonIdentifier)), nil);
 }
 
-id<GREYMatcher> SettingsMenuButton() {
++ (id<GREYMatcher>)settingsMenuButton {
   return grey_accessibilityID(kToolsMenuSettingsId);
 }
 
-id<GREYMatcher> SettingsDoneButton() {
++ (id<GREYMatcher>)settingsDoneButton {
   return grey_accessibilityID(kSettingsDoneButtonId);
 }
 
-id<GREYMatcher> ToolsMenuView() {
++ (id<GREYMatcher>)toolsMenuView {
   return grey_accessibilityID(kPopupMenuToolsMenuTableViewId);
 }
 
-id<GREYMatcher> OKButton() {
-  return ButtonWithAccessibilityLabelId(IDS_OK);
++ (id<GREYMatcher>)okButton {
+  return [ChromeMatchers buttonWithAccessibilityLabelId:(IDS_OK)];
 }
 
-id<GREYMatcher> PrimarySignInButton() {
++ (id<GREYMatcher>)primarySignInButton {
   return grey_accessibilityID(kSigninPromoPrimaryButtonId);
 }
 
-id<GREYMatcher> SecondarySignInButton() {
++ (id<GREYMatcher>)secondarySignInButton {
   return grey_accessibilityID(kSigninPromoSecondaryButtonId);
 }
 
-id<GREYMatcher> SettingsAccountButton() {
++ (id<GREYMatcher>)settingsAccountButton {
   return grey_accessibilityID(kSettingsAccountCellId);
 }
 
-id<GREYMatcher> SettingsAccountsCollectionView() {
++ (id<GREYMatcher>)settingsAccountsCollectionView {
   return grey_accessibilityID(kSettingsAccountsTableViewId);
 }
 
-id<GREYMatcher> SettingsImportDataImportButton() {
++ (id<GREYMatcher>)settingsImportDataImportButton {
   return grey_accessibilityID(kImportDataImportCellId);
 }
 
-id<GREYMatcher> SettingsImportDataKeepSeparateButton() {
++ (id<GREYMatcher>)settingsImportDataKeepSeparateButton {
   return grey_accessibilityID(kImportDataKeepSeparateCellId);
 }
 
-id<GREYMatcher> SettingsSyncManageSyncedDataButton() {
++ (id<GREYMatcher>)settingsSyncManageSyncedDataButton {
   return grey_accessibilityID(kSettingsSyncId);
 }
 
-id<GREYMatcher> AccountsSyncButton() {
++ (id<GREYMatcher>)accountsSyncButton {
   return grey_allOf(grey_accessibilityID(kSettingsAccountsTableViewSyncCellId),
                     grey_sufficientlyVisible(), nil);
 }
 
-id<GREYMatcher> ContentSettingsButton() {
-  return ButtonWithAccessibilityLabelId(IDS_IOS_CONTENT_SETTINGS_TITLE);
++ (id<GREYMatcher>)contentSettingsButton {
+  return [ChromeMatchers
+      buttonWithAccessibilityLabelId:(IDS_IOS_CONTENT_SETTINGS_TITLE)];
 }
 
-id<GREYMatcher> GoogleServicesSettingsButton() {
-  return ButtonWithAccessibilityLabelId(IDS_IOS_GOOGLE_SERVICES_SETTINGS_TITLE);
++ (id<GREYMatcher>)googleServicesSettingsButton {
+  return [ChromeMatchers
+      buttonWithAccessibilityLabelId:(IDS_IOS_GOOGLE_SERVICES_SETTINGS_TITLE)];
 }
 
-id<GREYMatcher> SettingsMenuBackButton() {
++ (id<GREYMatcher>)settingsMenuBackButton {
   UINavigationBar* navBar = base::mac::ObjCCastStrict<UINavigationBar>(
       SubviewWithAccessibilityIdentifier(
           @"SettingNavigationBar",
@@ -438,94 +450,95 @@
                     nil);
 }
 
-id<GREYMatcher> SettingsMenuPrivacyButton() {
-  return ButtonWithAccessibilityLabelId(
-      IDS_OPTIONS_ADVANCED_SECTION_TITLE_PRIVACY);
++ (id<GREYMatcher>)settingsMenuPrivacyButton {
+  return [ChromeMatchers buttonWithAccessibilityLabelId:
+                             (IDS_OPTIONS_ADVANCED_SECTION_TITLE_PRIVACY)];
 }
 
-id<GREYMatcher> SettingsMenuPasswordsButton() {
-  return ButtonWithAccessibilityLabelId(IDS_IOS_PASSWORDS);
++ (id<GREYMatcher>)settingsMenuPasswordsButton {
+  return [ChromeMatchers buttonWithAccessibilityLabelId:(IDS_IOS_PASSWORDS)];
 }
 
-id<GREYMatcher> PaymentRequestView() {
++ (id<GREYMatcher>)paymentRequestView {
   return grey_accessibilityID(kPaymentRequestCollectionViewID);
 }
 
 // Returns matcher for the error confirmation view for payment request.
-id<GREYMatcher> PaymentRequestErrorView() {
++ (id<GREYMatcher>)paymentRequestErrorView {
   return grey_accessibilityID(kPaymentRequestErrorCollectionViewID);
 }
 
-id<GREYMatcher> VoiceSearchButton() {
++ (id<GREYMatcher>)voiceSearchButton {
   return grey_allOf(grey_accessibilityID(kSettingsVoiceSearchCellId),
                     grey_accessibilityTrait(UIAccessibilityTraitButton), nil);
 }
 
-id<GREYMatcher> SettingsCollectionView() {
++ (id<GREYMatcher>)settingsCollectionView {
   return grey_accessibilityID(kSettingsTableViewId);
 }
 
-id<GREYMatcher> ClearBrowsingHistoryButton() {
++ (id<GREYMatcher>)clearBrowsingHistoryButton {
   return grey_accessibilityID(kClearBrowsingHistoryCellAccessibilityIdentifier);
 }
 
-id<GREYMatcher> ClearCookiesButton() {
++ (id<GREYMatcher>)clearCookiesButton {
   return grey_accessibilityID(kClearCookiesCellAccessibilityIdentifier);
 }
 
-id<GREYMatcher> ClearCacheButton() {
++ (id<GREYMatcher>)clearCacheButton {
   return grey_accessibilityID(kClearCacheCellAccessibilityIdentifier);
 }
 
-id<GREYMatcher> ClearSavedPasswordsButton() {
++ (id<GREYMatcher>)clearSavedPasswordsButton {
   return grey_accessibilityID(kClearSavedPasswordsCellAccessibilityIdentifier);
 }
 
-id<GREYMatcher> ContentSuggestionCollectionView() {
++ (id<GREYMatcher>)contentSuggestionCollectionView {
   return grey_accessibilityID(
       [ContentSuggestionsViewController collectionAccessibilityIdentifier]);
 }
 
-id<GREYMatcher> WarningMessageView() {
++ (id<GREYMatcher>)warningMessageView {
   return grey_accessibilityID(kWarningMessageAccessibilityID);
 }
 
-id<GREYMatcher> PaymentRequestPickerRow() {
++ (id<GREYMatcher>)paymentRequestPickerRow {
   return grey_accessibilityID(kPaymentRequestPickerRowAccessibilityID);
 }
 
-id<GREYMatcher> PaymentRequestPickerSearchBar() {
++ (id<GREYMatcher>)paymentRequestPickerSearchBar {
   return grey_accessibilityID(kPaymentRequestPickerSearchBarAccessibilityID);
 }
 
-id<GREYMatcher> BookmarksMenuButton() {
++ (id<GREYMatcher>)bookmarksMenuButton {
   return grey_accessibilityID(kToolsMenuBookmarksId);
 }
 
-id<GREYMatcher> RecentTabsMenuButton() {
++ (id<GREYMatcher>)recentTabsMenuButton {
   return grey_accessibilityID(kToolsMenuOtherDevicesId);
 }
 
-id<GREYMatcher> SystemSelectionCallout() {
++ (id<GREYMatcher>)systemSelectionCallout {
   return grey_kindOfClass(NSClassFromString(@"UICalloutBarButton"));
 }
 
-id<GREYMatcher> SystemSelectionCalloutCopyButton() {
++ (id<GREYMatcher>)systemSelectionCalloutCopyButton {
   return grey_accessibilityLabel(@"Copy");
 }
 
-id<GREYMatcher> ContextMenuCopyButton() {
-  return ButtonWithAccessibilityLabelId(IDS_IOS_CONTENT_CONTEXT_COPY);
++ (id<GREYMatcher>)contextMenuCopyButton {
+  return [ChromeMatchers
+      buttonWithAccessibilityLabelId:(IDS_IOS_CONTENT_CONTEXT_COPY)];
 }
 
-id<GREYMatcher> NewTabPageOmnibox() {
++ (id<GREYMatcher>)NTPOmnibox {
   return grey_allOf(
       grey_accessibilityLabel(l10n_util::GetNSString(IDS_OMNIBOX_EMPTY_HINT)),
       grey_minimumVisiblePercent(0.2), nil);
 }
 
-id<GREYMatcher> WebViewMatcher() {
++ (id<GREYMatcher>)webViewMatcher {
   return web::WebViewInWebState(chrome_test_util::GetCurrentWebState());
 }
 
-}  // namespace chrome_test_util
+@end
diff --git a/ios/chrome/test/earl_grey/chrome_matchers_shorthand.h b/ios/chrome/test/earl_grey/chrome_matchers_shorthand.h
new file mode 100644
index 0000000..eeb40eb
--- /dev/null
+++ b/ios/chrome/test/earl_grey/chrome_matchers_shorthand.h
@@ -0,0 +1,267 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_CHROME_TEST_EARL_GREY_CHROME_MATCHERS_SHORTHAND_H_
+#define IOS_CHROME_TEST_EARL_GREY_CHROME_MATCHERS_SHORTHAND_H_
+
+#import <Foundation/Foundation.h>
+
+#include <string>
+
+@protocol GREYMatcher;
+
+namespace chrome_test_util {
+
+// Matcher for element with accessibility label corresponding to |message_id|
+// and accessibility trait UIAccessibilityTraitButton.
+id<GREYMatcher> ButtonWithAccessibilityLabelId(int message_id);
+
+// Matcher for element with accessibility label corresponding to |label| and
+// accessibility trait UIAccessibilityTraitButton.
+id<GREYMatcher> ButtonWithAccessibilityLabel(NSString* label);
+
+// Matcher for element with an image corresponding to |image_id|.
+id<GREYMatcher> ImageViewWithImage(int image_id);
+
+// Matcher for element with an image defined by its name in the main bundle.
+id<GREYMatcher> ImageViewWithImageNamed(NSString* imageName);
+
+// Matcher for element with an image corresponding to |image_id| and
+// accessibility trait UIAccessibilityTraitButton.
+id<GREYMatcher> ButtonWithImage(int image_id);
+
+// Matcher for element with accessibility label corresponding to |message_id|
+// and accessibility trait UIAccessibilityTraitStaticText.
+id<GREYMatcher> StaticTextWithAccessibilityLabelId(int message_id);
+
+// Matcher for element with accessibility label corresponding to |label| and
+// accessibility trait UIAccessibilityTraitStaticText.
+id<GREYMatcher> StaticTextWithAccessibilityLabel(NSString* label);
+
+// Matcher for element with accessibility label corresponding to |message_id|
+// and accessibility trait UIAccessibilityTraitHeader.
+id<GREYMatcher> HeaderWithAccessibilityLabelId(int message_id);
+
+// Matcher for element with accessibility label corresponding to |label| and
+// accessibility trait UIAccessibilityTraitHeader.
+id<GREYMatcher> HeaderWithAccessibilityLabel(NSString* label);
+
+// Returns matcher for a cancel button.
+id<GREYMatcher> CancelButton();
+
+// Returns matcher for a close button.
+id<GREYMatcher> CloseButton();
+
+// Matcher for the navigate forward button.
+id<GREYMatcher> ForwardButton();
+
+// Matcher for the navigate backward button.
+id<GREYMatcher> BackButton();
+
+// Matcher for the reload button.
+id<GREYMatcher> ReloadButton();
+
+// Matcher for the stop loading button.
+id<GREYMatcher> StopButton();
+
+// Returns a matcher for the omnibox.
+id<GREYMatcher> Omnibox();
+
+// Returns a matcher for the location view.
+id<GREYMatcher> DefocusedLocationView();
+
+// Returns a matcher for the page security info button.
+id<GREYMatcher> PageSecurityInfoButton();
+// Returns a matcher for the page security info indicator.
+id<GREYMatcher> PageSecurityInfoIndicator();
+
+// Returns matcher for omnibox containing |text|. Performs an exact match of the
+// omnibox contents.
+id<GREYMatcher> OmniboxText(std::string text);
+
+// Returns matcher for |text| being a substring of the text in the omnibox.
+id<GREYMatcher> OmniboxContainingText(std::string text);
+
+// Returns matcher for |text| being a substring of the text in the location
+// view.
+id<GREYMatcher> LocationViewContainingText(std::string text);
+
+// Matcher for Tools menu button.
+id<GREYMatcher> ToolsMenuButton();
+
+// Matcher for the Share menu button.
+id<GREYMatcher> ShareButton();
+
+// Returns the GREYMatcher for the button that opens the tab switcher.
+id<GREYMatcher> TabletTabSwitcherOpenButton();
+
+// Matcher for show tabs button.
+id<GREYMatcher> ShowTabsButton();
+
+// Matcher for SettingsSwitchCell.
+id<GREYMatcher> SettingsSwitchCell(NSString* accessibility_identifier,
+                                   BOOL is_toggled_on);
+
+// Matcher for SettingsSwitchCell.
+id<GREYMatcher> SettingsSwitchCell(NSString* accessibility_identifier,
+                                   BOOL is_toggled_on,
+                                   BOOL is_enabled);
+
+// Matcher for LegacySyncSwitchCell.
+id<GREYMatcher> SyncSwitchCell(NSString* accessibility_label,
+                               BOOL is_toggled_on);
+
+// Matcher for the Open in New Tab option in the context menu when long pressing
+// a link.
+id<GREYMatcher> OpenLinkInNewTabButton();
+
+// Matcher for the done button on the navigation bar.
+id<GREYMatcher> NavigationBarDoneButton();
+
+// Matcher for the done button on the Bookmarks navigation bar.
+id<GREYMatcher> BookmarksNavigationBarDoneButton();
+
+// Returns matcher for the account consistency setup signin button.
+id<GREYMatcher> AccountConsistencySetupSigninButton();
+
+// Returns matcher for the account consistency confirmation button.
+id<GREYMatcher> AccountConsistencyConfirmationOkButton();
+
+// Returns matcher for the add account accounts button.
+id<GREYMatcher> AddAccountButton();
+
+// Returns matcher for the sign out accounts button.
+id<GREYMatcher> SignOutAccountsButton();
+
+// Returns matcher for the Clear Browsing Data cell on the Privacy screen.
+id<GREYMatcher> ClearBrowsingDataCell();
+
+// Returns matcher for the clear browsing data button on the clear browsing data
+// panel.
+id<GREYMatcher> ClearBrowsingDataButton();
+
+// Returns matcher for the clear browsing data collection view.
+id<GREYMatcher> ClearBrowsingDataCollectionView();
+
+// Matcher for the clear browsing data action sheet item.
+id<GREYMatcher> ConfirmClearBrowsingDataButton();
+
+// Returns matcher for the settings button in the tools menu.
+id<GREYMatcher> SettingsMenuButton();
+
+// Returns matcher for the "Done" button in the settings' navigation bar.
+id<GREYMatcher> SettingsDoneButton();
+
+// Returns matcher for the tools menu table view.
+id<GREYMatcher> ToolsMenuView();
+
+// Returns matcher for the OK button.
+id<GREYMatcher> OKButton();
+
+// Returns matcher for the primary button in the sign-in promo view. This is
+// "Sign in into Chrome" button for a cold state, or "Continue as John Doe" for
+// a warm state.
+id<GREYMatcher> PrimarySignInButton();
+
+// Returns matcher for the secondary button in the sign-in promo view. This is
+// "Not johndoe@example.com" button.
+id<GREYMatcher> SecondarySignInButton();
+
+// Returns matcher for the button for the currently signed in account in the
+// settings menu.
+id<GREYMatcher> SettingsAccountButton();
+
+// Returns matcher for the accounts collection view.
+id<GREYMatcher> SettingsAccountsCollectionView();
+
+// Returns matcher for the Import Data cell in switch sync account view.
+id<GREYMatcher> SettingsImportDataImportButton();
+
+// Returns matcher for the Keep Data Separate cell in switch sync account view.
+id<GREYMatcher> SettingsImportDataKeepSeparateButton();
+
+// Returns matcher for the Manage Synced Data button in sync setting view.
+id<GREYMatcher> SettingsSyncManageSyncedDataButton();
+
+// Returns matcher for the menu button to sync accounts.
+id<GREYMatcher> AccountsSyncButton();
+
+// Returns matcher for the Content Settings button on the main Settings screen.
+id<GREYMatcher> ContentSettingsButton();
+
+// Returns matcher for the Google Services Settings button on the main Settings
+// screen.
+id<GREYMatcher> GoogleServicesSettingsButton();
+
+// Returns matcher for the back button on a settings menu.
+id<GREYMatcher> SettingsMenuBackButton();
+
+// Returns matcher for the Privacy cell on the main Settings screen.
+id<GREYMatcher> SettingsMenuPrivacyButton();
+
+// Returns matcher for the Save passwords cell on the main Settings screen.
+id<GREYMatcher> SettingsMenuPasswordsButton();
+
+// Returns matcher for the payment request collection view.
+id<GREYMatcher> PaymentRequestView();
+
+// Returns matcher for the error confirmation view for payment request.
+id<GREYMatcher> PaymentRequestErrorView();
+
+// Returns matcher for the voice search button on the main Settings screen.
+id<GREYMatcher> VoiceSearchButton();
+
+// Returns matcher for the settings main menu view.
+id<GREYMatcher> SettingsCollectionView();
+
+// Returns matcher for the clear browsing history cell on the clear browsing
+// data panel.
+id<GREYMatcher> ClearBrowsingHistoryButton();
+
+// Returns matcher for the clear cookies cell on the clear browsing data panel.
+id<GREYMatcher> ClearCookiesButton();
+
+// Returns matcher for the clear cache cell on the clear browsing data panel.
+id<GREYMatcher> ClearCacheButton();
+
+// Returns matcher for the clear saved passwords cell on the clear browsing data
+// panel.
+id<GREYMatcher> ClearSavedPasswordsButton();
+
+// Returns matcher for the collection view of content suggestion.
+id<GREYMatcher> ContentSuggestionCollectionView();
+
+// Returns matcher for the warning message while filling in payment requests.
+id<GREYMatcher> WarningMessageView();
+
+// Returns matcher for the payment picker cell.
+id<GREYMatcher> PaymentRequestPickerRow();
+
+// Returns matcher for the payment request search bar.
+id<GREYMatcher> PaymentRequestPickerSearchBar();
+
+// Returns matcher for the bookmarks button on the Tools menu.
+id<GREYMatcher> BookmarksMenuButton();
+
+// Returns matcher for the recent tabs button on the Tools menu.
+id<GREYMatcher> RecentTabsMenuButton();
+
+// Returns matcher for the system selection callout.
+id<GREYMatcher> SystemSelectionCallout();
+
+// Returns matcher for the copy button on the system selection callout.
+id<GREYMatcher> SystemSelectionCalloutCopyButton();
+
+// Returns matcher for the Copy item on the context menu.
+id<GREYMatcher> ContextMenuCopyButton();
+
+// Returns matcher for defoucesed omnibox on a new tab.
+id<GREYMatcher> NewTabPageOmnibox();
+
+// Returns a matcher for the current WebView.
+id<GREYMatcher> WebViewMatcher();
+
+}
+
+#endif  // IOS_CHROME_TEST_EARL_GREY_CHROME_MATCHERS_SHORTHAND_H_
diff --git a/ios/chrome/test/earl_grey/chrome_matchers_shorthand.mm b/ios/chrome/test/earl_grey/chrome_matchers_shorthand.mm
new file mode 100644
index 0000000..7f89aad03
--- /dev/null
+++ b/ios/chrome/test/earl_grey/chrome_matchers_shorthand.mm
@@ -0,0 +1,330 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import <EarlGrey/EarlGrey.h>
+#import <WebKit/WebKit.h>
+
+#import "ios/chrome/test/earl_grey/chrome_matchers_shorthand.h"
+
+#import "ios/chrome/test/earl_grey/chrome_matchers.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+namespace chrome_test_util {
+
+id<GREYMatcher> ButtonWithAccessibilityLabel(NSString* label) {
+  return [ChromeMatchers buttonWithAccessibilityLabel:label];
+}
+
+id<GREYMatcher> ButtonWithAccessibilityLabelId(int message_id) {
+  return [ChromeMatchers buttonWithAccessibilityLabelId:message_id];
+}
+
+id<GREYMatcher> ImageViewWithImageNamed(NSString* imageName) {
+  return [ChromeMatchers imageViewWithImageNamed:imageName];
+}
+
+id<GREYMatcher> ImageViewWithImage(int image_id) {
+  return [ChromeMatchers imageViewWithImage:image_id];
+}
+
+id<GREYMatcher> ButtonWithImage(int image_id) {
+  return [ChromeMatchers buttonWithImage:image_id];
+}
+
+id<GREYMatcher> StaticTextWithAccessibilityLabelId(int message_id) {
+  return [ChromeMatchers staticTextWithAccessibilityLabelId:message_id];
+}
+
+id<GREYMatcher> StaticTextWithAccessibilityLabel(NSString* label) {
+  return [ChromeMatchers staticTextWithAccessibilityLabel:label];
+}
+
+id<GREYMatcher> HeaderWithAccessibilityLabelId(int message_id) {
+  return [ChromeMatchers headerWithAccessibilityLabelId:message_id];
+}
+
+id<GREYMatcher> HeaderWithAccessibilityLabel(NSString* label) {
+  return [ChromeMatchers headerWithAccessibilityLabel:label];
+}
+
+id<GREYMatcher> CancelButton() {
+  return [ChromeMatchers cancelButton];
+}
+
+id<GREYMatcher> CloseButton() {
+  return [ChromeMatchers closeButton];
+}
+
+id<GREYMatcher> ForwardButton() {
+  return [ChromeMatchers forwardButton];
+}
+
+id<GREYMatcher> BackButton() {
+  return [ChromeMatchers backButton];
+}
+
+id<GREYMatcher> ReloadButton() {
+  return [ChromeMatchers reloadButton];
+}
+
+id<GREYMatcher> StopButton() {
+  return [ChromeMatchers stopButton];
+}
+
+id<GREYMatcher> Omnibox() {
+  return [ChromeMatchers omnibox];
+}
+
+id<GREYMatcher> DefocusedLocationView() {
+  return [ChromeMatchers defocusedLocationView];
+}
+
+id<GREYMatcher> PageSecurityInfoButton() {
+  return [ChromeMatchers pageSecurityInfoButton];
+}
+
+id<GREYMatcher> PageSecurityInfoIndicator() {
+  return [ChromeMatchers pageSecurityInfoIndicator];
+}
+
+id<GREYMatcher> OmniboxText(std::string text) {
+  return [ChromeMatchers omniboxText:text];
+}
+
+id<GREYMatcher> OmniboxContainingText(std::string text) {
+  return [ChromeMatchers omniboxContainingText:text];
+}
+
+id<GREYMatcher> LocationViewContainingText(std::string text) {
+  return [ChromeMatchers locationViewContainingText:text];
+}
+
+id<GREYMatcher> ToolsMenuButton() {
+  return [ChromeMatchers toolsMenuButton];
+}
+
+id<GREYMatcher> ShareButton() {
+  return [ChromeMatchers shareButton];
+}
+
+id<GREYMatcher> TabletTabSwitcherOpenButton() {
+  return [ChromeMatchers tabletTabSwitcherOpenButton];
+}
+
+id<GREYMatcher> ShowTabsButton() {
+  return [ChromeMatchers showTabsButton];
+}
+
+id<GREYMatcher> SettingsSwitchCell(NSString* accessibility_identifier,
+                                   BOOL is_toggled_on) {
+  return [ChromeMatchers settingsSwitchCell:accessibility_identifier
+                                isToggledOn:is_toggled_on];
+}
+
+id<GREYMatcher> SettingsSwitchCell(NSString* accessibility_identifier,
+                                   BOOL is_toggled_on,
+                                   BOOL is_enabled) {
+  return [ChromeMatchers settingsSwitchCell:accessibility_identifier
+                                isToggledOn:is_toggled_on
+                                  isEnabled:is_enabled];
+}
+
+id<GREYMatcher> SyncSwitchCell(NSString* accessibility_label,
+                               BOOL is_toggled_on) {
+  return [ChromeMatchers syncSwitchCell:accessibility_label
+                            isToggledOn:is_toggled_on];
+}
+
+id<GREYMatcher> OpenLinkInNewTabButton() {
+  return [ChromeMatchers openLinkInNewTabButton];
+}
+
+id<GREYMatcher> NavigationBarDoneButton() {
+  return [ChromeMatchers navigationBarDoneButton];
+}
+
+id<GREYMatcher> BookmarksNavigationBarDoneButton() {
+  return [ChromeMatchers bookmarksNavigationBarDoneButton];
+}
+
+id<GREYMatcher> AccountConsistencySetupSigninButton() {
+  return [ChromeMatchers accountConsistencySetupSigninButton];
+}
+
+id<GREYMatcher> AccountConsistencyConfirmationOkButton() {
+  return [ChromeMatchers accountConsistencyConfirmationOkButton];
+}
+
+id<GREYMatcher> AddAccountButton() {
+  return [ChromeMatchers addAccountButton];
+}
+
+id<GREYMatcher> SignOutAccountsButton() {
+  return [ChromeMatchers signOutAccountsButton];
+}
+
+id<GREYMatcher> ClearBrowsingDataCell() {
+  return [ChromeMatchers clearBrowsingDataCell];
+}
+
+id<GREYMatcher> ClearBrowsingDataButton() {
+  return [ChromeMatchers clearBrowsingDataButton];
+}
+
+id<GREYMatcher> ClearBrowsingDataCollectionView() {
+  return [ChromeMatchers clearBrowsingDataCollectionView];
+}
+
+id<GREYMatcher> ConfirmClearBrowsingDataButton() {
+  return [ChromeMatchers confirmClearBrowsingDataButton];
+}
+
+id<GREYMatcher> SettingsMenuButton() {
+  return [ChromeMatchers settingsMenuButton];
+}
+
+id<GREYMatcher> SettingsDoneButton() {
+  return [ChromeMatchers settingsDoneButton];
+}
+
+id<GREYMatcher> ToolsMenuView() {
+  return [ChromeMatchers toolsMenuView];
+}
+
+id<GREYMatcher> OKButton() {
+  return [ChromeMatchers okButton];
+}
+
+id<GREYMatcher> PrimarySignInButton() {
+  return [ChromeMatchers primarySignInButton];
+}
+
+id<GREYMatcher> SecondarySignInButton() {
+  return [ChromeMatchers secondarySignInButton];
+}
+
+id<GREYMatcher> SettingsAccountButton() {
+  return [ChromeMatchers settingsAccountButton];
+}
+
+id<GREYMatcher> SettingsAccountsCollectionView() {
+  return [ChromeMatchers settingsAccountsCollectionView];
+}
+
+id<GREYMatcher> SettingsImportDataImportButton() {
+  return [ChromeMatchers settingsImportDataImportButton];
+}
+
+id<GREYMatcher> SettingsImportDataKeepSeparateButton() {
+  return [ChromeMatchers settingsImportDataKeepSeparateButton];
+}
+
+id<GREYMatcher> SettingsSyncManageSyncedDataButton() {
+  return [ChromeMatchers settingsSyncManageSyncedDataButton];
+}
+
+id<GREYMatcher> AccountsSyncButton() {
+  return [ChromeMatchers accountsSyncButton];
+}
+
+id<GREYMatcher> ContentSettingsButton() {
+  return [ChromeMatchers contentSettingsButton];
+}
+
+id<GREYMatcher> GoogleServicesSettingsButton() {
+  return [ChromeMatchers googleServicesSettingsButton];
+}
+
+id<GREYMatcher> SettingsMenuBackButton() {
+  return [ChromeMatchers settingsMenuBackButton];
+}
+
+id<GREYMatcher> SettingsMenuPrivacyButton() {
+  return [ChromeMatchers settingsMenuPrivacyButton];
+}
+
+id<GREYMatcher> SettingsMenuPasswordsButton() {
+  return [ChromeMatchers settingsMenuPasswordsButton];
+}
+
+id<GREYMatcher> PaymentRequestView() {
+  return [ChromeMatchers paymentRequestView];
+}
+
+id<GREYMatcher> PaymentRequestErrorView() {
+  return [ChromeMatchers paymentRequestErrorView];
+}
+
+id<GREYMatcher> VoiceSearchButton() {
+  return [ChromeMatchers voiceSearchButton];
+}
+
+id<GREYMatcher> SettingsCollectionView() {
+  return [ChromeMatchers settingsCollectionView];
+}
+
+id<GREYMatcher> ClearBrowsingHistoryButton() {
+  return [ChromeMatchers clearBrowsingHistoryButton];
+}
+
+id<GREYMatcher> ClearCookiesButton() {
+  return [ChromeMatchers clearCookiesButton];
+}
+
+id<GREYMatcher> ClearCacheButton() {
+  return [ChromeMatchers clearCacheButton];
+}
+
+id<GREYMatcher> ClearSavedPasswordsButton() {
+  return [ChromeMatchers clearSavedPasswordsButton];
+}
+
+id<GREYMatcher> ContentSuggestionCollectionView() {
+  return [ChromeMatchers contentSuggestionCollectionView];
+}
+
+id<GREYMatcher> WarningMessageView() {
+  return [ChromeMatchers warningMessageView];
+}
+
+id<GREYMatcher> PaymentRequestPickerRow() {
+  return [ChromeMatchers paymentRequestPickerRow];
+}
+
+id<GREYMatcher> PaymentRequestPickerSearchBar() {
+  return [ChromeMatchers paymentRequestPickerSearchBar];
+}
+
+id<GREYMatcher> BookmarksMenuButton() {
+  return [ChromeMatchers bookmarksMenuButton];
+}
+
+id<GREYMatcher> RecentTabsMenuButton() {
+  return [ChromeMatchers recentTabsMenuButton];
+}
+
+id<GREYMatcher> SystemSelectionCallout() {
+  return [ChromeMatchers systemSelectionCallout];
+}
+
+id<GREYMatcher> SystemSelectionCalloutCopyButton() {
+  return [ChromeMatchers systemSelectionCalloutCopyButton];
+}
+
+id<GREYMatcher> ContextMenuCopyButton() {
+  return [ChromeMatchers contextMenuCopyButton];
+}
+
+id<GREYMatcher> NewTabPageOmnibox() {
+  return [ChromeMatchers NTPOmnibox];
+}
+
+id<GREYMatcher> WebViewMatcher() {
+  return [ChromeMatchers webViewMatcher];
+}
+
+}  // namespace chrome_test_util