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_VIEWS_PASSWORDS_MANAGE_PASSWORDS_VIEW_TEST_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_VIEW_TEST_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_VIEW_TEST_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_VIEW_TEST_H_ |
7 | 7 |
8 #include "base/metrics/histogram_samples.h" | 8 #include "base/metrics/histogram_samples.h" |
9 #include "base/test/statistics_delta_reader.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" |
11 #include "components/autofill/core/common/password_form.h" | 11 #include "components/autofill/core/common/password_form.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 class ManagePasswordsUIControllerMock; | 14 class ManagePasswordsUIControllerMock; |
15 class ManagePasswordsIconView; | 15 class ManagePasswordsIconView; |
16 | 16 |
17 // Test class for the various password management view bits and pieces. Sets | 17 // Test class for the various password management view bits and pieces. Sets |
18 // up a ManagePasswordsUIControllerMock, and provides some helper methods | 18 // up a ManagePasswordsUIControllerMock, and provides some helper methods |
19 // to poke at the bubble, icon, and controller's state. | 19 // to poke at the bubble, icon, and controller's state. |
(...skipping 22 matching lines...) Expand all Loading... |
42 // Put the controller, icon, and bubble into a blacklisted state. | 42 // Put the controller, icon, and bubble into a blacklisted state. |
43 void SetupBlackistedPassword(); | 43 void SetupBlackistedPassword(); |
44 | 44 |
45 // Get samples for |histogram|. | 45 // Get samples for |histogram|. |
46 base::HistogramSamples* GetSamples(const char* histogram); | 46 base::HistogramSamples* GetSamples(const char* histogram); |
47 | 47 |
48 autofill::PasswordForm* test_form() { return &test_form_; } | 48 autofill::PasswordForm* test_form() { return &test_form_; } |
49 | 49 |
50 private: | 50 private: |
51 autofill::PasswordForm test_form_; | 51 autofill::PasswordForm test_form_; |
52 base::StatisticsDeltaReader statistics_reader_; | 52 base::HistogramTester histogram_tester_; |
53 | 53 |
54 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsViewTest); | 54 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsViewTest); |
55 }; | 55 }; |
56 | 56 |
57 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_VIEW_TEST_H_ | 57 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_VIEW_TEST_H_ |
OLD | NEW |