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 "base/metrics/histogram_samples.h" | 8 #include "base/metrics/histogram_samples.h" |
9 #include "base/test/histogram_tester.h" | 9 #include "base/test/histogram_tester.h" |
10 #include "chrome/test/base/in_process_browser_test.h" | 10 #include "chrome/test/base/in_process_browser_test.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 // Put the controller, icon, and bubble into an auto sign-in state. | 55 // Put the controller, icon, and bubble into an auto sign-in state. |
56 void SetupAutoSignin( | 56 void SetupAutoSignin( |
57 ScopedVector<autofill::PasswordForm> local_credentials); | 57 ScopedVector<autofill::PasswordForm> local_credentials); |
58 | 58 |
59 // Get samples for |histogram|. | 59 // Get samples for |histogram|. |
60 base::HistogramSamples* GetSamples(const char* histogram); | 60 base::HistogramSamples* GetSamples(const char* histogram); |
61 | 61 |
62 autofill::PasswordForm* test_form() { return &test_form_; } | 62 autofill::PasswordForm* test_form() { return &test_form_; } |
63 | 63 |
64 MOCK_METHOD1(OnChooseCredential, | |
65 void(const password_manager::CredentialInfo&)); | |
66 private: | |
67 // Get the UI controller for the current WebContents. | 64 // Get the UI controller for the current WebContents. |
68 ManagePasswordsUIController* GetController(); | 65 ManagePasswordsUIController* GetController(); |
69 | 66 |
| 67 MOCK_METHOD1(OnChooseCredential, |
| 68 void(const password_manager::CredentialInfo&)); |
| 69 |
| 70 private: |
70 autofill::PasswordForm test_form_; | 71 autofill::PasswordForm test_form_; |
71 base::HistogramTester histogram_tester_; | 72 base::HistogramTester histogram_tester_; |
72 | 73 |
73 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsTest); | 74 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsTest); |
74 }; | 75 }; |
75 | 76 |
76 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_TEST_H_ | 77 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_TEST_H_ |
OLD | NEW |