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

Unified Diff: ios/chrome/browser/ui/ntp/new_tab_page_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
« no previous file with comments | « ios/chrome/browser/ui/history/history_ui_egtest.mm ('k') | ios/chrome/test/earl_grey/chrome_matchers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/ntp/new_tab_page_egtest.mm
diff --git a/ios/chrome/browser/ui/ntp/new_tab_page_egtest.mm b/ios/chrome/browser/ui/ntp/new_tab_page_egtest.mm
index 078f4805580c28c179f640aec147e0fdff95fec4..58c0f1b0f17b082e5520275a3931e33bce9a2556 100644
--- a/ios/chrome/browser/ui/ntp/new_tab_page_egtest.mm
+++ b/ios/chrome/browser/ui/ntp/new_tab_page_egtest.mm
@@ -288,12 +288,10 @@ void AssertNTPScrolledToTop(bool scrolledToTop) {
EARL_GREY_TEST_SKIPPED(@"Skipped for iPad (no hidden toolbar in tablet)");
}
- NSString* tabSwitcherLabel =
- l10n_util::GetNSString(IDS_IOS_TOOLBAR_SHOW_TABS);
NSString* toolsMenuLabel = l10n_util::GetNSString(IDS_IOS_TOOLBAR_SETTINGS);
// Check that the toolbar's tab switcher and tools menu buttons are visible.
- [[EarlGrey selectElementWithMatcher:grey_accessibilityLabel(tabSwitcherLabel)]
+ [[EarlGrey selectElementWithMatcher:chrome_test_util::ShowTabsButton()]
assertWithMatcher:grey_sufficientlyVisible()];
[[EarlGrey selectElementWithMatcher:grey_accessibilityLabel(toolsMenuLabel)]
assertWithMatcher:grey_sufficientlyVisible()];
@@ -306,7 +304,7 @@ void AssertNTPScrolledToTop(bool scrolledToTop) {
AssertNTPScrolledToTop(YES);
// Check that tab switcher and tools menu buttons are not on screen.
- [[EarlGrey selectElementWithMatcher:grey_accessibilityLabel(tabSwitcherLabel)]
+ [[EarlGrey selectElementWithMatcher:chrome_test_util::ShowTabsButton()]
assertWithMatcher:grey_notVisible()];
[[EarlGrey selectElementWithMatcher:grey_accessibilityLabel(toolsMenuLabel)]
assertWithMatcher:grey_notVisible()];
« no previous file with comments | « ios/chrome/browser/ui/history/history_ui_egtest.mm ('k') | ios/chrome/test/earl_grey/chrome_matchers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698