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 <XCTest/XCTest.h> | 6 #import <XCTest/XCTest.h> |
7 | 7 |
8 #include "base/ios/ios_util.h" | 8 #include "base/ios/ios_util.h" |
9 #include "components/strings/grit/components_strings.h" | 9 #include "components/strings/grit/components_strings.h" |
10 #import "ios/chrome/browser/ui/commands/generic_chrome_command.h" | 10 #import "ios/chrome/browser/ui/commands/generic_chrome_command.h" |
11 #include "ios/chrome/browser/ui/commands/ios_command_ids.h" | 11 #include "ios/chrome/browser/ui/commands/ios_command_ids.h" |
12 #import "ios/chrome/browser/ui/ntp/new_tab_page_controller.h" | 12 #import "ios/chrome/browser/ui/ntp/new_tab_page_controller.h" |
13 #import "ios/chrome/browser/ui/omnibox/omnibox_popup_material_row.h" | 13 #import "ios/chrome/browser/ui/omnibox/omnibox_popup_material_row.h" |
14 #import "ios/chrome/browser/ui/toolbar/toolbar_controller.h" | 14 #import "ios/chrome/browser/ui/toolbar/toolbar_controller.h" |
15 #include "ios/chrome/browser/ui/tools_menu/tools_menu_constants.h" | 15 #include "ios/chrome/browser/ui/tools_menu/tools_menu_constants.h" |
16 #include "ios/chrome/browser/ui/ui_util.h" | 16 #include "ios/chrome/browser/ui/ui_util.h" |
17 #include "ios/chrome/grit/ios_strings.h" | 17 #include "ios/chrome/grit/ios_strings.h" |
18 #import "ios/chrome/test/app/chrome_test_util.h" | 18 #import "ios/chrome/test/app/chrome_test_util.h" |
19 #import "ios/chrome/test/app/tab_test_util.h" | 19 #import "ios/chrome/test/app/tab_test_util.h" |
20 #import "ios/chrome/test/earl_grey/chrome_assertions.h" | 20 #import "ios/chrome/test/earl_grey/chrome_assertions.h" |
21 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" | 21 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" |
22 #import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h" | 22 #import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h" |
23 #import "ios/chrome/test/earl_grey/chrome_matchers.h" | 23 #import "ios/chrome/test/earl_grey/chrome_matchers.h" |
24 #import "ios/chrome/test/earl_grey/chrome_test_case.h" | 24 #import "ios/chrome/test/earl_grey/chrome_test_case.h" |
25 #import "ios/web/public/test/http_server.h" | 25 #import "ios/web/public/test/http_server/http_server.h" |
26 #include "ios/web/public/test/http_server_util.h" | 26 #include "ios/web/public/test/http_server/http_server_util.h" |
27 #include "ui/base/l10n/l10n_util_mac.h" | 27 #include "ui/base/l10n/l10n_util_mac.h" |
28 | 28 |
29 #if !defined(__has_feature) || !__has_feature(objc_arc) | 29 #if !defined(__has_feature) || !__has_feature(objc_arc) |
30 #error "This file requires ARC support." | 30 #error "This file requires ARC support." |
31 #endif | 31 #endif |
32 | 32 |
33 using chrome_test_util::ButtonWithAccessibilityLabelId; | 33 using chrome_test_util::ButtonWithAccessibilityLabelId; |
34 using chrome_test_util::OmniboxText; | 34 using chrome_test_util::OmniboxText; |
35 using chrome_test_util::WebViewContainingText; | 35 using chrome_test_util::WebViewContainingText; |
36 | 36 |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 NSString* clearText = IsIPadIdiom() ? typingShield : cancelButtonText; | 467 NSString* clearText = IsIPadIdiom() ? typingShield : cancelButtonText; |
468 | 468 |
469 [[EarlGrey selectElementWithMatcher:grey_accessibilityLabel(clearText)] | 469 [[EarlGrey selectElementWithMatcher:grey_accessibilityLabel(clearText)] |
470 performAction:grey_tap()]; | 470 performAction:grey_tap()]; |
471 [[EarlGrey selectElementWithMatcher:chrome_test_util::Omnibox()] | 471 [[EarlGrey selectElementWithMatcher:chrome_test_util::Omnibox()] |
472 assertWithMatcher:chrome_test_util::OmniboxText("")]; | 472 assertWithMatcher:chrome_test_util::OmniboxText("")]; |
473 | 473 |
474 SelectNewTabPagePanel(NewTabPage::kMostVisitedPanel); | 474 SelectNewTabPagePanel(NewTabPage::kMostVisitedPanel); |
475 } | 475 } |
476 @end | 476 @end |
OLD | NEW |