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

Side by Side Diff: chrome/browser/ui/views/passwords/manage_passwords_view_test.h

Issue 444603003: Hook up the Mac password bubble to the browser and add browser tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix views build Created 6 years, 4 months 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_VIEW_TEST_H_
6 #define CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_VIEW_TEST_H_
7
8 #include "base/metrics/histogram_samples.h"
9 #include "base/test/histogram_tester.h"
10 #include "chrome/test/base/in_process_browser_test.h"
11 #include "components/autofill/core/common/password_form.h"
12 #include "testing/gtest/include/gtest/gtest.h"
13
14 class ManagePasswordsUIControllerMock;
15 class ManagePasswordsIconView;
16
17 // Test class for the various password management view bits and pieces. Sets
18 // up a ManagePasswordsUIControllerMock, and provides some helper methods
19 // to poke at the bubble, icon, and controller's state.
20 class ManagePasswordsViewTest : public InProcessBrowserTest {
21 public:
22 ManagePasswordsViewTest() {}
23
24 // InProcessBrowserTest:
25 virtual void SetUpOnMainThread() OVERRIDE;
26
27 // Get the mock UI controller for the current WebContents.
28 ManagePasswordsUIControllerMock* controller();
29
30 // Get the icon view for the current WebContents.
31 ManagePasswordsIconView* view();
32
33 // Execute the browser command to open the manage passwords bubble.
34 void ExecuteManagePasswordsCommand();
35
36 // Put the controller, icon, and bubble into a managing-password state.
37 void SetupManagingPasswords();
38
39 // Put the controller, icon, and bubble into the confirmation state.
40 void SetupAutomaticPassword();
41
42 // Put the controller, icon, and bubble into a pending-password state.
43 void SetupPendingPassword();
44
45 // Put the controller, icon, and bubble into a blacklisted state.
46 void SetupBlackistedPassword();
47
48 // Get samples for |histogram|.
49 base::HistogramSamples* GetSamples(const char* histogram);
50
51 autofill::PasswordForm* test_form() { return &test_form_; }
52
53 private:
54 autofill::PasswordForm test_form_;
55 base::HistogramTester histogram_tester_;
56
57 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsViewTest);
58 };
59
60 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_VIEW_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698