OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ios/chrome/browser/passwords/password_generation_agent.h" | 5 #import "ios/chrome/browser/passwords/password_generation_agent.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/mac/foundation_util.h" | 11 #include "base/mac/foundation_util.h" |
12 #include "base/mac/scoped_objc_class_swizzler.h" | 12 #include "base/mac/scoped_objc_class_swizzler.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/memory/ptr_util.h" | 14 #include "base/memory/ptr_util.h" |
15 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
16 #include "base/strings/sys_string_conversions.h" | 16 #include "base/strings/sys_string_conversions.h" |
17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
18 #include "components/autofill/core/common/form_data.h" | 18 #include "components/autofill/core/common/form_data.h" |
19 #include "components/autofill/core/common/form_field_data.h" | 19 #include "components/autofill/core/common/form_field_data.h" |
20 #include "components/autofill/core/common/password_form.h" | 20 #include "components/autofill/core/common/password_form.h" |
21 #import "components/autofill/ios/browser/js_suggestion_manager.h" | 21 #import "components/autofill/ios/browser/js_suggestion_manager.h" |
22 #include "google_apis/gaia/gaia_urls.h" | 22 #include "google_apis/gaia/gaia_urls.h" |
23 #import "ios/chrome/browser/autofill/form_input_accessory_view_controller.h" | 23 #import "ios/chrome/browser/autofill/form_input_accessory_view_controller.h" |
24 #import "ios/chrome/browser/passwords/js_password_manager.h" | 24 #import "ios/chrome/browser/passwords/js_password_manager.h" |
25 #import "ios/chrome/browser/passwords/password_generation_offer_view.h" | 25 #import "ios/chrome/browser/passwords/password_generation_offer_view.h" |
26 #import "ios/chrome/browser/passwords/passwords_ui_delegate.h" | 26 #import "ios/chrome/browser/passwords/passwords_ui_delegate.h" |
27 #import "ios/chrome/browser/ui/commands/generic_chrome_command.h" | 27 #import "ios/chrome/browser/ui/commands/generic_chrome_command.h" |
28 #include "ios/chrome/browser/ui/commands/ios_command_ids.h" | 28 #include "ios/chrome/browser/ui/commands/ios_command_ids.h" |
29 #import "ios/testing/ocmock_complex_type_helper.h" | 29 #import "ios/testing/ocmock_complex_type_helper.h" |
30 #include "ios/web/public/test/test_web_state.h" | 30 #import "ios/web/public/test/fakes/test_web_state.h" |
| 31 #import "ios/web/public/test/web_test_with_web_state.h" |
31 #include "ios/web/public/web_state/url_verification_constants.h" | 32 #include "ios/web/public/web_state/url_verification_constants.h" |
32 #import "ios/web/public/test/web_test_with_web_state.h" | |
33 #include "testing/gtest_mac.h" | 33 #include "testing/gtest_mac.h" |
34 #include "third_party/ocmock/OCMock/OCMock.h" | 34 #include "third_party/ocmock/OCMock/OCMock.h" |
35 #include "third_party/ocmock/gtest_support.h" | 35 #include "third_party/ocmock/gtest_support.h" |
36 #include "url/gurl.h" | 36 #include "url/gurl.h" |
37 | 37 |
38 #if !defined(__has_feature) || !__has_feature(objc_arc) | 38 #if !defined(__has_feature) || !__has_feature(objc_arc) |
39 #error "This file requires ARC support." | 39 #error "This file requires ARC support." |
40 #endif | 40 #endif |
41 | 41 |
42 namespace { | 42 namespace { |
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 [agent() showSavedPasswords:nil]; | 512 [agent() showSavedPasswords:nil]; |
513 EXPECT_EQ(NO, mock_ui_delegate().UIShown); | 513 EXPECT_EQ(NO, mock_ui_delegate().UIShown); |
514 | 514 |
515 GenericChromeCommand* command = base::mac::ObjCCast<GenericChromeCommand>( | 515 GenericChromeCommand* command = base::mac::ObjCCast<GenericChromeCommand>( |
516 g_chrome_execute_command_sender); | 516 g_chrome_execute_command_sender); |
517 EXPECT_TRUE(command); | 517 EXPECT_TRUE(command); |
518 EXPECT_EQ(IDC_SHOW_SAVE_PASSWORDS_SETTINGS, command.tag); | 518 EXPECT_EQ(IDC_SHOW_SAVE_PASSWORDS_SETTINGS, command.tag); |
519 } | 519 } |
520 | 520 |
521 } // namespace | 521 } // namespace |
OLD | NEW |