Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_test.h

Issue 1467343002: Create an interface between ChromePasswordManagerClient and ManagePasswordsUIController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changed a comment Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/metrics/histogram_samples.h" 10 #include "base/metrics/histogram_samples.h"
11 #include "base/test/histogram_tester.h" 11 #include "base/test/histogram_tester.h"
12 #include "chrome/test/base/in_process_browser_test.h" 12 #include "chrome/test/base/in_process_browser_test.h"
13 #include "components/autofill/core/common/password_form.h" 13 #include "components/autofill/core/common/password_form.h"
14 #include "components/password_manager/core/common/credential_manager_types.h" 14 #include "components/password_manager/core/common/credential_manager_types.h"
15 #include "testing/gmock/include/gmock/gmock.h" 15 #include "testing/gmock/include/gmock/gmock.h"
16 #include "testing/gtest/include/gtest/gtest.h"
17 16
18 class ManagePasswordsUIController; 17 class GURL;
19 class ManagePasswordsIconView; 18 class ManagePasswordsIconView;
20 class GURL; 19 class PasswordsClientUIDelegate;
21 20
22 // Test class for the various password management view bits and pieces. Sets 21 // Test class for the various password management view bits and pieces. Sets
23 // up a ManagePasswordsUIControllerMock, and provides some helper methods 22 // up a ManagePasswordsUIControllerMock, and provides some helper methods
24 // to poke at the bubble, icon, and controller's state. 23 // to poke at the bubble, icon, and controller's state.
25 class ManagePasswordsTest : public InProcessBrowserTest { 24 class ManagePasswordsTest : public InProcessBrowserTest {
26 public: 25 public:
27 ManagePasswordsTest(); 26 ManagePasswordsTest();
28 ~ManagePasswordsTest(); 27 ~ManagePasswordsTest();
29 28
30 // InProcessBrowserTest: 29 // InProcessBrowserTest:
(...skipping 23 matching lines...) Expand all
54 // Put the controller, icon, and bubble into an auto sign-in state. 53 // Put the controller, icon, and bubble into an auto sign-in state.
55 void SetupAutoSignin( 54 void SetupAutoSignin(
56 ScopedVector<autofill::PasswordForm> local_credentials); 55 ScopedVector<autofill::PasswordForm> local_credentials);
57 56
58 // Get samples for |histogram|. 57 // Get samples for |histogram|.
59 scoped_ptr<base::HistogramSamples> GetSamples(const char* histogram); 58 scoped_ptr<base::HistogramSamples> GetSamples(const char* histogram);
60 59
61 autofill::PasswordForm* test_form() { return &test_form_; } 60 autofill::PasswordForm* test_form() { return &test_form_; }
62 61
63 // Get the UI controller for the current WebContents. 62 // Get the UI controller for the current WebContents.
64 ManagePasswordsUIController* GetController(); 63 PasswordsClientUIDelegate* GetController();
65 64
66 MOCK_METHOD1(OnChooseCredential, 65 MOCK_METHOD1(OnChooseCredential,
67 void(const password_manager::CredentialInfo&)); 66 void(const password_manager::CredentialInfo&));
68 67
69 private: 68 private:
70 autofill::PasswordForm test_form_; 69 autofill::PasswordForm test_form_;
71 base::HistogramTester histogram_tester_; 70 base::HistogramTester histogram_tester_;
72 71
73 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsTest); 72 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsTest);
74 }; 73 };
75 74
76 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_TEST_H_ 75 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698