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

Unified Diff: ios/chrome/browser/ui/settings/block_popups_egtest.mm

Issue 2733973002: Create shared matcher for navigation bar done button. (Closed)
Patch Set: remove sufficientlyVisible from shared matcher 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/settings/block_popups_egtest.mm
diff --git a/ios/chrome/browser/ui/settings/block_popups_egtest.mm b/ios/chrome/browser/ui/settings/block_popups_egtest.mm
index 8c74466d3e1f03309311335f9238b7859efc74c1..59446e50d688b1c7f505e40204a170f2e8a266df 100644
--- a/ios/chrome/browser/ui/settings/block_popups_egtest.mm
+++ b/ios/chrome/browser/ui/settings/block_popups_egtest.mm
@@ -31,6 +31,8 @@
#include "ui/base/l10n/l10n_util_mac.h"
#include "url/gurl.h"
+using chrome_test_util::NavigationBarDoneButton;
+
namespace {
// URLs used in the tests.
@@ -91,9 +93,7 @@ void CloseSettings() {
grey_accessibilityTrait(
UIAccessibilityTraitButton),
nil)] performAction:grey_tap()];
- [[EarlGrey
- selectElementWithMatcher:chrome_test_util::ButtonWithAccessibilityLabelId(
- IDS_IOS_NAVIGATION_BAR_DONE_BUTTON)]
+ [[EarlGrey selectElementWithMatcher:NavigationBarDoneButton()]
performAction:grey_tap()];
}
@@ -275,9 +275,7 @@ class ScopedBlockPopupsException {
selectElementWithMatcher:grey_accessibilityLabel(l10n_util::GetNSString(
IDS_IOS_NAVIGATION_BAR_EDIT_BUTTON))]
assertWithMatcher:grey_notVisible()];
- [[EarlGrey
- selectElementWithMatcher:grey_accessibilityLabel(l10n_util::GetNSString(
- IDS_IOS_NAVIGATION_BAR_DONE_BUTTON))]
+ [[EarlGrey selectElementWithMatcher:NavigationBarDoneButton()]
assertWithMatcher:grey_sufficientlyVisible()];
// Toggle the switch back on via the UI and make sure the exceptions are now

Powered by Google App Engine
This is Rietveld 408576698