Commit 9a9083e4 authored by Mike Baxley's avatar Mike Baxley Committed by Commit Bot

Use shared matchers in history_ui_egtest.mm.

Matchers already exist to clear cache and cookies, so this test
should use those.

Bug: 
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I70749c6e222d8e745b26469709778359452a1754
Reviewed-on: https://chromium-review.googlesource.com/806638Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Commit-Queue: Mike Baxley <baxley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521697}
parent 30e4788c
......@@ -17,7 +17,6 @@
#import "ios/chrome/browser/ui/authentication/signin_earlgrey_utils.h"
#import "ios/chrome/browser/ui/authentication/signin_promo_view.h"
#import "ios/chrome/browser/ui/history/history_entry_item.h"
#import "ios/chrome/browser/ui/settings/clear_browsing_data_collection_view_controller.h"
#import "ios/chrome/browser/ui/settings/settings_collection_view_controller.h"
#include "ios/chrome/browser/ui/tools_menu/public/tools_menu_constants.h"
#import "ios/chrome/browser/ui/tools_menu/tools_popup_controller.h"
......@@ -119,15 +118,6 @@ id<GREYMatcher> OpenInNewIncognitoTabButton() {
id<GREYMatcher> CopyUrlButton() {
return ButtonWithAccessibilityLabelId(IDS_IOS_CONTENT_CONTEXT_COPY);
}
// Matcher for the clear cookies cell on the clear browsing data panel.
id<GREYMatcher> ClearCookiesButton() {
return grey_accessibilityID(kClearCookiesCellId);
}
// Matcher for the clear cache cell on the clear browsing data panel.
id<GREYMatcher> ClearCacheButton() {
return grey_allOf(grey_accessibilityID(kClearCacheCellId),
grey_sufficientlyVisible(), nil);
}
// Matcher for the clear browsing data button on the clear browsing data panel.
id<GREYMatcher> ClearBrowsingDataButton() {
return ButtonWithAccessibilityLabelId(IDS_IOS_CLEAR_BUTTON);
......@@ -323,9 +313,9 @@ id<GREYMatcher> ConfirmClearBrowsingDataButton() {
// Uncheck "Cookies, Site Data" and "Cached Images and Files," which are
// checked by default, and press "Clear Browsing Data"
[[EarlGrey selectElementWithMatcher:ClearCookiesButton()]
[[EarlGrey selectElementWithMatcher:chrome_test_util::ClearCookiesButton()]
performAction:grey_tap()];
[[EarlGrey selectElementWithMatcher:ClearCacheButton()]
[[EarlGrey selectElementWithMatcher:chrome_test_util::ClearCacheButton()]
performAction:grey_tap()];
[[EarlGrey selectElementWithMatcher:ClearBrowsingDataButton()]
performAction:grey_tap()];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment