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 #include "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/prefs/pref_service.h" | 6 #include "base/prefs/pref_service.h" |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
9 #include "chrome/browser/ui/passwords/manage_passwords_bubble.h" | 9 #include "chrome/browser/ui/passwords/manage_passwords_bubble.h" |
10 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" | 10 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" |
11 #include "chrome/browser/ui/passwords/manage_passwords_icon.h" | 11 #include "chrome/browser/ui/passwords/manage_passwords_icon.h" |
12 #include "chrome/browser/ui/passwords/manage_passwords_icon_mock.h" | 12 #include "chrome/browser/ui/passwords/manage_passwords_icon_mock.h" |
13 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h" | 13 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h" |
14 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 14 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
15 #include "chrome/test/base/testing_profile.h" | 15 #include "chrome/test/base/testing_profile.h" |
16 #include "components/autofill/core/common/password_form.h" | 16 #include "components/autofill/core/common/password_form.h" |
17 #include "components/password_manager/content/common/credential_manager_types.h" | |
18 #include "components/password_manager/core/browser/password_form_manager.h" | 17 #include "components/password_manager/core/browser/password_form_manager.h" |
19 #include "components/password_manager/core/browser/stub_password_manager_client.
h" | 18 #include "components/password_manager/core/browser/stub_password_manager_client.
h" |
20 #include "components/password_manager/core/browser/stub_password_manager_driver.
h" | 19 #include "components/password_manager/core/browser/stub_password_manager_driver.
h" |
| 20 #include "components/password_manager/core/common/credential_manager_types.h" |
21 #include "components/password_manager/core/common/password_manager_ui.h" | 21 #include "components/password_manager/core/common/password_manager_ui.h" |
22 #include "content/public/browser/navigation_details.h" | 22 #include "content/public/browser/navigation_details.h" |
23 #include "content/public/test/test_browser_thread_bundle.h" | 23 #include "content/public/test/test_browser_thread_bundle.h" |
24 #include "content/public/test/web_contents_tester.h" | 24 #include "content/public/test/web_contents_tester.h" |
25 #include "testing/gmock/include/gmock/gmock.h" | 25 #include "testing/gmock/include/gmock/gmock.h" |
26 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
27 | 27 |
28 using ::testing::ElementsAre; | 28 using ::testing::ElementsAre; |
29 using ::testing::Pointee; | 29 using ::testing::Pointee; |
30 | 30 |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 TEST_F(ManagePasswordsUIControllerTest, InactiveOnPSLMatched) { | 543 TEST_F(ManagePasswordsUIControllerTest, InactiveOnPSLMatched) { |
544 base::string16 kTestUsername = base::ASCIIToUTF16("test_username"); | 544 base::string16 kTestUsername = base::ASCIIToUTF16("test_username"); |
545 autofill::PasswordFormMap map; | 545 autofill::PasswordFormMap map; |
546 autofill::PasswordForm psl_matched_test_form = test_local_form(); | 546 autofill::PasswordForm psl_matched_test_form = test_local_form(); |
547 psl_matched_test_form.original_signon_realm = "http://pslmatched.example.com"; | 547 psl_matched_test_form.original_signon_realm = "http://pslmatched.example.com"; |
548 map[kTestUsername] = &psl_matched_test_form; | 548 map[kTestUsername] = &psl_matched_test_form; |
549 controller()->OnPasswordAutofilled(map); | 549 controller()->OnPasswordAutofilled(map); |
550 | 550 |
551 EXPECT_EQ(password_manager::ui::INACTIVE_STATE, controller()->state()); | 551 EXPECT_EQ(password_manager::ui::INACTIVE_STATE, controller()->state()); |
552 } | 552 } |
OLD | NEW |