| 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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 - (void)testAccessibilityOnHistory { | 491 - (void)testAccessibilityOnHistory { |
| 492 [self openHistoryPanel]; | 492 [self openHistoryPanel]; |
| 493 chrome_test_util::VerifyAccessibilityForCurrentScreen(); | 493 chrome_test_util::VerifyAccessibilityForCurrentScreen(); |
| 494 // Close history. | 494 // Close history. |
| 495 [[EarlGrey | 495 [[EarlGrey |
| 496 selectElementWithMatcher:chrome_test_util::ButtonWithAccessibilityLabelId( | 496 selectElementWithMatcher:chrome_test_util::ButtonWithAccessibilityLabelId( |
| 497 IDS_IOS_NAVIGATION_BAR_DONE_BUTTON)] | 497 IDS_IOS_NAVIGATION_BAR_DONE_BUTTON)] |
| 498 performAction:grey_tap()]; | 498 performAction:grey_tap()]; |
| 499 } | 499 } |
| 500 | 500 |
| 501 // Tests that hitting the tab key doesn't trigger the omnibox in the background. |
| 502 // Testing against regressions of the fix for crbug.com/676993. |
| 503 - (void)testTabKeyIsANoOp { |
| 504 TODO |
| 505 } |
| 506 |
| 501 #pragma mark Helper Methods | 507 #pragma mark Helper Methods |
| 502 | 508 |
| 503 - (void)loadTestURLs { | 509 - (void)loadTestURLs { |
| 504 [ChromeEarlGrey loadURL:_URL1]; | 510 [ChromeEarlGrey loadURL:_URL1]; |
| 505 [[EarlGrey selectElementWithMatcher:WebViewContainingText(kResponse1)] | 511 [[EarlGrey selectElementWithMatcher:WebViewContainingText(kResponse1)] |
| 506 assertWithMatcher:grey_notNil()]; | 512 assertWithMatcher:grey_notNil()]; |
| 507 | 513 |
| 508 [ChromeEarlGrey loadURL:_URL2]; | 514 [ChromeEarlGrey loadURL:_URL2]; |
| 509 [[EarlGrey selectElementWithMatcher:WebViewContainingText(kResponse2)] | 515 [[EarlGrey selectElementWithMatcher:WebViewContainingText(kResponse2)] |
| 510 assertWithMatcher:grey_notNil()]; | 516 assertWithMatcher:grey_notNil()]; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 537 - (void)resetBrowsingDataPrefs { | 543 - (void)resetBrowsingDataPrefs { |
| 538 PrefService* prefs = chrome_test_util::GetOriginalBrowserState()->GetPrefs(); | 544 PrefService* prefs = chrome_test_util::GetOriginalBrowserState()->GetPrefs(); |
| 539 prefs->ClearPref(browsing_data::prefs::kDeleteBrowsingHistory); | 545 prefs->ClearPref(browsing_data::prefs::kDeleteBrowsingHistory); |
| 540 prefs->ClearPref(browsing_data::prefs::kDeleteCookies); | 546 prefs->ClearPref(browsing_data::prefs::kDeleteCookies); |
| 541 prefs->ClearPref(browsing_data::prefs::kDeleteCache); | 547 prefs->ClearPref(browsing_data::prefs::kDeleteCache); |
| 542 prefs->ClearPref(browsing_data::prefs::kDeletePasswords); | 548 prefs->ClearPref(browsing_data::prefs::kDeletePasswords); |
| 543 prefs->ClearPref(browsing_data::prefs::kDeleteFormData); | 549 prefs->ClearPref(browsing_data::prefs::kDeleteFormData); |
| 544 } | 550 } |
| 545 | 551 |
| 546 @end | 552 @end |
| OLD | NEW |