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 | 6 |
7 #include "base/strings/sys_string_conversions.h" | 7 #include "base/strings/sys_string_conversions.h" |
8 #import "base/test/ios/wait_util.h" | 8 #import "base/test/ios/wait_util.h" |
9 #include "ios/chrome/browser/autofill/form_input_accessory_view_controller.h" | 9 #include "ios/chrome/browser/autofill/form_input_accessory_view_controller.h" |
10 #include "ios/chrome/browser/ui/ui_util.h" | 10 #include "ios/chrome/browser/ui/ui_util.h" |
11 #include "ios/chrome/grit/ios_strings.h" | 11 #include "ios/chrome/grit/ios_strings.h" |
12 #import "ios/chrome/test/app/chrome_test_util.h" | 12 #import "ios/chrome/test/app/chrome_test_util.h" |
13 #import "ios/chrome/test/app/tab_test_util.h" | 13 #import "ios/chrome/test/app/tab_test_util.h" |
14 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" | 14 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" |
15 #import "ios/chrome/test/earl_grey/chrome_matchers.h" | 15 #import "ios/chrome/test/earl_grey/chrome_matchers.h" |
16 #import "ios/chrome/test/earl_grey/chrome_test_case.h" | 16 #import "ios/chrome/test/earl_grey/chrome_test_case.h" |
17 #import "ios/testing/wait_util.h" | 17 #import "ios/testing/wait_util.h" |
18 #import "ios/web/public/test/earl_grey/web_view_actions.h" | 18 #import "ios/web/public/test/earl_grey/web_view_actions.h" |
19 #import "ios/web/public/test/earl_grey/web_view_matchers.h" | 19 #import "ios/web/public/test/earl_grey/web_view_matchers.h" |
20 #import "ios/web/public/test/http_server.h" | 20 #import "ios/web/public/test/http_server/http_server.h" |
21 #include "ios/web/public/test/http_server_util.h" | 21 #include "ios/web/public/test/http_server/http_server_util.h" |
22 | 22 |
23 #if !defined(__has_feature) || !__has_feature(objc_arc) | 23 #if !defined(__has_feature) || !__has_feature(objc_arc) |
24 #error "This file requires ARC support." | 24 #error "This file requires ARC support." |
25 #endif | 25 #endif |
26 | 26 |
27 namespace { | 27 namespace { |
28 | 28 |
29 const char kFormElementId1[] = "username"; | 29 const char kFormElementId1[] = "username"; |
30 const char kFormElementId2[] = "otherstuff"; | 30 const char kFormElementId2[] = "otherstuff"; |
31 | 31 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 // visible doesn't crash the browser. | 155 // visible doesn't crash the browser. |
156 - (void)testCloseKeyboardWhenNotVisible { | 156 - (void)testCloseKeyboardWhenNotVisible { |
157 FormInputAccessoryViewController* inputAccessoryViewController = | 157 FormInputAccessoryViewController* inputAccessoryViewController = |
158 chrome_test_util::GetInputAccessoryViewController(); | 158 chrome_test_util::GetInputAccessoryViewController(); |
159 GREYAssertNotNil(inputAccessoryViewController, | 159 GREYAssertNotNil(inputAccessoryViewController, |
160 @"The tab's input accessory view should not be non nil."); | 160 @"The tab's input accessory view should not be non nil."); |
161 [inputAccessoryViewController closeKeyboardWithoutButtonPress]; | 161 [inputAccessoryViewController closeKeyboardWithoutButtonPress]; |
162 } | 162 } |
163 | 163 |
164 @end | 164 @end |
OLD | NEW |