| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import <EarlGrey/EarlGrey.h> | 5 #import <EarlGrey/EarlGrey.h> |
| 6 #import <UIKit/UIKit.h> | 6 #import <UIKit/UIKit.h> |
| 7 #import <XCTest/XCTest.h> | 7 #import <XCTest/XCTest.h> |
| 8 | 8 |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 [[EarlGrey selectElementWithMatcher:ClearCacheButton()] | 384 [[EarlGrey selectElementWithMatcher:ClearCacheButton()] |
| 385 performAction:grey_tap()]; | 385 performAction:grey_tap()]; |
| 386 [[EarlGrey selectElementWithMatcher:ClearBrowsingDataButton()] | 386 [[EarlGrey selectElementWithMatcher:ClearBrowsingDataButton()] |
| 387 performAction:grey_tap()]; | 387 performAction:grey_tap()]; |
| 388 [[EarlGrey selectElementWithMatcher:ConfirmClearBrowsingDataButton()] | 388 [[EarlGrey selectElementWithMatcher:ConfirmClearBrowsingDataButton()] |
| 389 performAction:grey_tap()]; | 389 performAction:grey_tap()]; |
| 390 | 390 |
| 391 // Include sufficientlyVisible condition for the case of the clear browsing | 391 // Include sufficientlyVisible condition for the case of the clear browsing |
| 392 // dialog, which also has a "Done" button and is displayed over the history | 392 // dialog, which also has a "Done" button and is displayed over the history |
| 393 // panel. | 393 // panel. |
| 394 id<GREYMatcher> visibleDoneButton = grey_allOf( | 394 id<GREYMatcher> visibleDoneButton = |
| 395 ButtonWithAccessibilityLabelId(IDS_IOS_NAVIGATION_BAR_DONE_BUTTON), | 395 grey_allOf(chrome_test_util::NavigationBarDoneButton(), |
| 396 grey_sufficientlyVisible(), nil); | 396 grey_sufficientlyVisible(), nil); |
| 397 [[EarlGrey selectElementWithMatcher:visibleDoneButton] | 397 [[EarlGrey selectElementWithMatcher:visibleDoneButton] |
| 398 performAction:grey_tap()]; | 398 performAction:grey_tap()]; |
| 399 | 399 |
| 400 [self assertNoHistoryShown]; | 400 [self assertNoHistoryShown]; |
| 401 } | 401 } |
| 402 | 402 |
| 403 // Tests display and selection of 'Open in New Tab' in a context menu on a | 403 // Tests display and selection of 'Open in New Tab' in a context menu on a |
| 404 // history entry. | 404 // history entry. |
| 405 - (void)testContextMenuOpenInNewTab { | 405 - (void)testContextMenuOpenInNewTab { |
| 406 [self loadTestURLs]; | 406 [self loadTestURLs]; |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 - (void)resetBrowsingDataPrefs { | 517 - (void)resetBrowsingDataPrefs { |
| 518 PrefService* prefs = chrome_test_util::GetOriginalBrowserState()->GetPrefs(); | 518 PrefService* prefs = chrome_test_util::GetOriginalBrowserState()->GetPrefs(); |
| 519 prefs->ClearPref(browsing_data::prefs::kDeleteBrowsingHistory); | 519 prefs->ClearPref(browsing_data::prefs::kDeleteBrowsingHistory); |
| 520 prefs->ClearPref(browsing_data::prefs::kDeleteCookies); | 520 prefs->ClearPref(browsing_data::prefs::kDeleteCookies); |
| 521 prefs->ClearPref(browsing_data::prefs::kDeleteCache); | 521 prefs->ClearPref(browsing_data::prefs::kDeleteCache); |
| 522 prefs->ClearPref(browsing_data::prefs::kDeletePasswords); | 522 prefs->ClearPref(browsing_data::prefs::kDeletePasswords); |
| 523 prefs->ClearPref(browsing_data::prefs::kDeleteFormData); | 523 prefs->ClearPref(browsing_data::prefs::kDeleteFormData); |
| 524 } | 524 } |
| 525 | 525 |
| 526 @end | 526 @end |
| OLD | NEW |