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

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

Issue 2760313003: Revert of Refine the accessibility label of Clear Browsing Data flow. (Closed)
Patch Set: 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/settings/clear_browsing_data_collection_view_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/settings/settings_egtest.mm
diff --git a/ios/chrome/browser/ui/settings/settings_egtest.mm b/ios/chrome/browser/ui/settings/settings_egtest.mm
index 34a3e09ee0f9cf592a77f7e22e0ac33248065928..87f28d3b7d47e786a36298e1d9003e8d3686c80b 100644
--- a/ios/chrome/browser/ui/settings/settings_egtest.mm
+++ b/ios/chrome/browser/ui/settings/settings_egtest.mm
@@ -94,10 +94,6 @@
id<GREYMatcher> ClearBrowsingDataButton() {
return ButtonWithAccessibilityLabelId(IDS_IOS_CLEAR_BUTTON);
}
-// Matcher for the clear browsing data action sheet item.
-id<GREYMatcher> ConfirmClearBrowsingDataButton() {
- return ButtonWithAccessibilityLabelId(IDS_IOS_CONFIRM_CLEAR_BUTTON);
-}
// Matcher for the Settings button in the tools menu.
id<GREYMatcher> SettingsButton() {
return grey_accessibilityID(kToolsMenuSettingsId);
@@ -287,8 +283,15 @@
- (void)clearBrowsingData {
[[EarlGrey selectElementWithMatcher:ClearBrowsingDataButton()]
performAction:grey_tap()];
- [[EarlGrey selectElementWithMatcher:ConfirmClearBrowsingDataButton()]
- performAction:grey_tap()];
+
+ // There is not currently a matcher for accessibilityElementIsFocused or
+ // userInteractionEnabled which could be used here instead of checking that
+ // the button is not a MDCCollectionViewTextCell. Use when available.
+ // TODO(crbug.com/638674): Evaluate if this can move to shared code.
+ id<GREYMatcher> confirmClear = grey_allOf(
+ ClearBrowsingDataButton(),
+ grey_not(grey_kindOfClass([MDCCollectionViewTextCell class])), nil);
+ [[EarlGrey selectElementWithMatcher:confirmClear] performAction:grey_tap()];
}
// Exits Settings by clicking on the Done button.
@@ -703,6 +706,7 @@
// Verifies that logging into a form on a web page allows the user to save and
// then clear a password.
- (void)testClearPasswords {
+
ios::ChromeBrowserState* browserState =
chrome_test_util::GetOriginalBrowserState();
PrefService* preferences = browserState->GetPrefs();
« no previous file with comments | « ios/chrome/browser/ui/settings/clear_browsing_data_collection_view_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698