Commit 7a87b415 authored by Justin Cohen's avatar Justin Cohen Committed by Commit Bot

[ios] Remove old recent tab tests.

Bug: 807330
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Change-Id: I988192d63f2189524b86c5ccd40f64fe42aebf40
Reviewed-on: https://chromium-review.googlesource.com/1228515
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592782}
parent 766637ea
...@@ -74,21 +74,14 @@ id<GREYMatcher> TitleOfTestPage() { ...@@ -74,21 +74,14 @@ id<GREYMatcher> TitleOfTestPage() {
web::test::HttpServer::MakeUrl(kURLOfTestPage), web::test::HttpServer::MakeUrl(kURLOfTestPage),
std::string(kHTMLOfTestPage), std::string(kHTMLOfTestPage),
}}); }});
if (IsUIRefreshPhase1Enabled()) { [NSUserDefaults.standardUserDefaults setObject:@{}
[NSUserDefaults.standardUserDefaults setObject:@{} forKey:kListModelCollapsedKey];
forKey:kListModelCollapsedKey];
} else {
[NSUserDefaults.standardUserDefaults setObject:@{}
forKey:kCollapsedSectionsKey];
}
} }
// Closes the recent tabs panel. // Closes the recent tabs panel.
- (void)closeRecentTabs { - (void)closeRecentTabs {
NSString* exitID = IsUIRefreshPhase1Enabled() id<GREYMatcher> exitMatcher =
? kTableViewNavigationDismissButtonId grey_accessibilityID(kTableViewNavigationDismissButtonId);
: @"Exit";
id<GREYMatcher> exitMatcher = grey_accessibilityID(exitID);
[[EarlGrey selectElementWithMatcher:exitMatcher] performAction:grey_tap()]; [[EarlGrey selectElementWithMatcher:exitMatcher] performAction:grey_tap()];
// Wait until the recent tabs panel is dismissed. // Wait until the recent tabs panel is dismissed.
[[GREYUIThreadExecutor sharedInstance] drainUntilIdle]; [[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
...@@ -137,11 +130,8 @@ id<GREYMatcher> TitleOfTestPage() { ...@@ -137,11 +130,8 @@ id<GREYMatcher> TitleOfTestPage() {
// Tap "Show Full History" // Tap "Show Full History"
id<GREYMatcher> showHistoryMatcher = id<GREYMatcher> showHistoryMatcher =
IsUIRefreshPhase1Enabled() chrome_test_util::StaticTextWithAccessibilityLabelId(
? chrome_test_util::StaticTextWithAccessibilityLabelId( IDS_HISTORY_SHOWFULLHISTORY_LINK);
IDS_HISTORY_SHOWFULLHISTORY_LINK)
: chrome_test_util::ButtonWithAccessibilityLabelId(
IDS_HISTORY_SHOWFULLHISTORY_LINK);
[[EarlGrey selectElementWithMatcher:showHistoryMatcher] [[EarlGrey selectElementWithMatcher:showHistoryMatcher]
performAction:grey_tap()]; performAction:grey_tap()];
...@@ -156,17 +146,9 @@ id<GREYMatcher> TitleOfTestPage() { ...@@ -156,17 +146,9 @@ id<GREYMatcher> TitleOfTestPage() {
assertWithMatcher:grey_sufficientlyVisible()]; assertWithMatcher:grey_sufficientlyVisible()];
// Close History. // Close History.
if (IsUIRefreshPhase1Enabled()) { id<GREYMatcher> exitMatcher =
id<GREYMatcher> exitMatcher = grey_accessibilityID(kHistoryNavigationControllerDoneButtonIdentifier);
grey_accessibilityID(kHistoryNavigationControllerDoneButtonIdentifier); [[EarlGrey selectElementWithMatcher:exitMatcher] performAction:grey_tap()];
[[EarlGrey selectElementWithMatcher:exitMatcher] performAction:grey_tap()];
} else {
[[EarlGrey
selectElementWithMatcher:chrome_test_util::ButtonWithAccessibilityLabel(
l10n_util::GetNSString(
IDS_IOS_NAVIGATION_BAR_DONE_BUTTON))]
performAction:grey_tap()];
}
// Close tab. // Close tab.
chrome_test_util::CloseCurrentTab(); chrome_test_util::CloseCurrentTab();
......
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