| 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 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_TEST_H_ | 5 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_TEST_H_ |
| 6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_TEST_H_ | 6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_TEST_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/metrics/histogram_samples.h" | 11 #include "base/metrics/histogram_samples.h" |
| 12 #include "base/test/histogram_tester.h" | 12 #include "base/test/histogram_tester.h" |
| 13 #include "chrome/test/base/in_process_browser_test.h" | 13 #include "chrome/test/base/in_process_browser_test.h" |
| 14 #include "components/autofill/core/common/password_form.h" | 14 #include "components/autofill/core/common/password_form.h" |
| 15 #include "components/password_manager/core/browser/fake_form_fetcher.h" |
| 16 #include "components/password_manager/core/browser/stub_password_manager_client.
h" |
| 17 #include "components/password_manager/core/browser/stub_password_manager_driver.
h" |
| 15 #include "components/password_manager/core/common/credential_manager_types.h" | 18 #include "components/password_manager/core/common/credential_manager_types.h" |
| 16 #include "testing/gmock/include/gmock/gmock.h" | 19 #include "testing/gmock/include/gmock/gmock.h" |
| 17 | 20 |
| 18 class ManagePasswordsIconView; | 21 class ManagePasswordsIconView; |
| 19 class PasswordsClientUIDelegate; | 22 class PasswordsClientUIDelegate; |
| 20 | 23 |
| 21 // Test class for the various password management view bits and pieces. Provides | 24 // Test class for the various password management view bits and pieces. Provides |
| 22 // some helper methods to poke at the bubble, icon, and controller's state. | 25 // some helper methods to poke at the bubble, icon, and controller's state. |
| 23 class ManagePasswordsTest : public InProcessBrowserTest { | 26 class ManagePasswordsTest : public InProcessBrowserTest { |
| 24 public: | 27 public: |
| (...skipping 29 matching lines...) Expand all Loading... |
| 54 | 57 |
| 55 // Get the UI controller for the current WebContents. | 58 // Get the UI controller for the current WebContents. |
| 56 PasswordsClientUIDelegate* GetController(); | 59 PasswordsClientUIDelegate* GetController(); |
| 57 | 60 |
| 58 MOCK_METHOD1(OnChooseCredential, | 61 MOCK_METHOD1(OnChooseCredential, |
| 59 void(const password_manager::CredentialInfo&)); | 62 void(const password_manager::CredentialInfo&)); |
| 60 | 63 |
| 61 private: | 64 private: |
| 62 autofill::PasswordForm test_form_; | 65 autofill::PasswordForm test_form_; |
| 63 base::HistogramTester histogram_tester_; | 66 base::HistogramTester histogram_tester_; |
| 67 password_manager::StubPasswordManagerClient client_; |
| 68 password_manager::StubPasswordManagerDriver driver_; |
| 69 password_manager::FakeFormFetcher fetcher_; |
| 64 | 70 |
| 65 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsTest); | 71 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsTest); |
| 66 }; | 72 }; |
| 67 | 73 |
| 68 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_TEST_H_ | 74 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_TEST_H_ |
| OLD | NEW |