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 "components/strings/grit/components_strings.h" | 8 #include "components/strings/grit/components_strings.h" |
9 #import "ios/chrome/browser/ui/browser_view_controller.h" | 9 #import "ios/chrome/browser/ui/browser_view_controller.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 #include "ios/chrome/browser/ui/tools_menu/tools_menu_constants.h" | 13 #include "ios/chrome/browser/ui/tools_menu/tools_menu_constants.h" |
14 #include "ios/chrome/browser/ui/ui_util.h" | 14 #include "ios/chrome/browser/ui/ui_util.h" |
15 #import "ios/chrome/browser/ui/uikit_ui_util.h" | 15 #import "ios/chrome/browser/ui/uikit_ui_util.h" |
16 #include "ios/chrome/grit/ios_strings.h" | 16 #include "ios/chrome/grit/ios_strings.h" |
17 #import "ios/chrome/test/app/bookmarks_test_util.h" | 17 #import "ios/chrome/test/app/bookmarks_test_util.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_earl_grey.h" | 20 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" |
21 #import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h" | 21 #import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h" |
22 #import "ios/chrome/test/earl_grey/chrome_matchers.h" | 22 #import "ios/chrome/test/earl_grey/chrome_matchers.h" |
23 #import "ios/chrome/test/earl_grey/chrome_test_case.h" | 23 #import "ios/chrome/test/earl_grey/chrome_test_case.h" |
24 #import "ios/web/public/test/http_server.h" | 24 #import "ios/web/public/test/http_server/http_server.h" |
25 #include "ios/web/public/test/http_server_util.h" | 25 #include "ios/web/public/test/http_server/http_server_util.h" |
26 | 26 |
27 #if !defined(__has_feature) || !__has_feature(objc_arc) | 27 #if !defined(__has_feature) || !__has_feature(objc_arc) |
28 #error "This file requires ARC support." | 28 #error "This file requires ARC support." |
29 #endif | 29 #endif |
30 | 30 |
31 using chrome_test_util::NavigationBarDoneButton; | 31 using chrome_test_util::NavigationBarDoneButton; |
32 | 32 |
33 const CGFloat kScrollDisplacement = 50.0; | 33 const CGFloat kScrollDisplacement = 50.0; |
34 | 34 |
35 // Test cases to verify that keyboard commands are and are not registered when | 35 // Test cases to verify that keyboard commands are and are not registered when |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 [self verifyKeyboardCommandsAreRegistered]; | 218 [self verifyKeyboardCommandsAreRegistered]; |
219 | 219 |
220 UIResponder* firstResponder = GetFirstResponder(); | 220 UIResponder* firstResponder = GetFirstResponder(); |
221 GREYAssert( | 221 GREYAssert( |
222 [firstResponder isKindOfClass:NSClassFromString(@"WKContentView")], | 222 [firstResponder isKindOfClass:NSClassFromString(@"WKContentView")], |
223 @"Expected first responder to be a WKContentView. Instead, is a %@", | 223 @"Expected first responder to be a WKContentView. Instead, is a %@", |
224 NSStringFromClass([firstResponder class])); | 224 NSStringFromClass([firstResponder class])); |
225 } | 225 } |
226 | 226 |
227 @end | 227 @end |
OLD | NEW |