| 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" |
| 11 #include "components/autofill/core/common/password_form.h" | 11 #include "components/autofill/core/common/password_form.h" |
| 12 #include "components/password_manager/content/common/credential_manager_types.h" | 12 #include "components/password_manager/content/common/credential_manager_types.h" |
| 13 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 15 | 15 |
| 16 class ManagePasswordsUIController; | 16 class ManagePasswordsUIController; |
| 17 class ManagePasswordsIcon; | 17 class ManagePasswordsIcon; |
| 18 class GURL; | 18 class GURL; |
| 19 | 19 |
| 20 // Test class for the various password management view bits and pieces. Sets | 20 // Test class for the various password management view bits and pieces. Sets |
| 21 // up a ManagePasswordsUIControllerMock, and provides some helper methods | 21 // up a ManagePasswordsUIControllerMock, and provides some helper methods |
| 22 // to poke at the bubble, icon, and controller's state. | 22 // to poke at the bubble, icon, and controller's state. |
| 23 class ManagePasswordsTest : public InProcessBrowserTest { | 23 class ManagePasswordsTest : public InProcessBrowserTest { |
| 24 public: | 24 public: |
| 25 ManagePasswordsTest() = default; | 25 ManagePasswordsTest(); |
| 26 ~ManagePasswordsTest() = default; | 26 ~ManagePasswordsTest(); |
| 27 | 27 |
| 28 // InProcessBrowserTest: | 28 // InProcessBrowserTest: |
| 29 void SetUpOnMainThread() override; | 29 void SetUpOnMainThread() override; |
| 30 | 30 |
| 31 // Get the icon view for the current WebContents. | 31 // Get the icon view for the current WebContents. |
| 32 virtual ManagePasswordsIcon* view() = 0; | 32 virtual ManagePasswordsIcon* view() = 0; |
| 33 | 33 |
| 34 // Execute the browser command to open the manage passwords bubble. | 34 // Execute the browser command to open the manage passwords bubble. |
| 35 void ExecuteManagePasswordsCommand(); | 35 void ExecuteManagePasswordsCommand(); |
| 36 | 36 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 63 // Get the UI controller for the current WebContents. | 63 // Get the UI controller for the current WebContents. |
| 64 ManagePasswordsUIController* GetController(); | 64 ManagePasswordsUIController* GetController(); |
| 65 | 65 |
| 66 autofill::PasswordForm test_form_; | 66 autofill::PasswordForm test_form_; |
| 67 base::HistogramTester histogram_tester_; | 67 base::HistogramTester histogram_tester_; |
| 68 | 68 |
| 69 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsTest); | 69 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsTest); |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_TEST_H_ | 72 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_TEST_H_ |
| OLD | NEW |