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

Side by Side Diff: chrome/browser/ui/cocoa/passwords/base_passwords_controller_test.h

Issue 1610653002: Integrate the account chooser dialog on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 years, 11 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
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_COCOA_PASSWORDS_BASE_PASSWORDS_CONTROLLER_TEST_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_PASSWORDS_BASE_PASSWORDS_CONTROLLER_TEST_H_
6 #define CHROME_BROWSER_UI_COCOA_PASSWORDS_BASE_PASSWORDS_CONTROLLER_TEST_H_ 6 #define CHROME_BROWSER_UI_COCOA_PASSWORDS_BASE_PASSWORDS_CONTROLLER_TEST_H_
7 7
8 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" 8 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
9 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h" 9 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h"
10 #import "chrome/browser/ui/cocoa/passwords/base_passwords_content_view_controlle r.h" 10 #import "chrome/browser/ui/cocoa/passwords/base_passwords_content_view_controlle r.h"
(...skipping 13 matching lines...) Expand all
24 void SetUp() override; 24 void SetUp() override;
25 25
26 ManagePasswordsUIControllerMock* ui_controller() { return ui_controller_; } 26 ManagePasswordsUIControllerMock* ui_controller() { return ui_controller_; }
27 ManagePasswordsBubbleModel* GetModelAndCreateIfNull(); 27 ManagePasswordsBubbleModel* GetModelAndCreateIfNull();
28 28
29 // Sets the appropriate state for ManagePasswordsBubbleModel. 29 // Sets the appropriate state for ManagePasswordsBubbleModel.
30 void SetUpSavePendingState(bool empty_username); 30 void SetUpSavePendingState(bool empty_username);
31 void SetUpUpdatePendingState(bool multiple_forms); 31 void SetUpUpdatePendingState(bool multiple_forms);
32 void SetUpConfirmationState(); 32 void SetUpConfirmationState();
33 void SetUpManageState(); 33 void SetUpManageState();
34 void SetUpAccountChooser(
35 ScopedVector<const autofill::PasswordForm> local,
36 ScopedVector<const autofill::PasswordForm> federations);
37 34
38 // An opportunity for tests to override the constructor parameter of 35 // An opportunity for tests to override the constructor parameter of
39 // ManagePasswordsBubbleModel. 36 // ManagePasswordsBubbleModel.
40 virtual ManagePasswordsBubbleModel::DisplayReason GetDisplayReason() const; 37 virtual ManagePasswordsBubbleModel::DisplayReason GetDisplayReason() const;
41 38
42 private: 39 private:
43 ManagePasswordsUIControllerMock* ui_controller_; 40 ManagePasswordsUIControllerMock* ui_controller_;
44 scoped_ptr<content::WebContents> test_web_contents_; 41 scoped_ptr<content::WebContents> test_web_contents_;
45 scoped_ptr<ManagePasswordsBubbleModel> model_; 42 scoped_ptr<ManagePasswordsBubbleModel> model_;
46 }; 43 };
47 44
48 // Helper delegate for testing the views of the password management bubble. 45 // Helper delegate for testing the views of the password management bubble.
49 @interface ContentViewDelegateMock 46 @interface ContentViewDelegateMock
50 : NSObject<ManagePasswordsBubbleContentViewDelegate> { 47 : NSObject<ManagePasswordsBubbleContentViewDelegate> {
51 @private 48 @private
52 BOOL _dismissed; 49 BOOL _dismissed;
53 } 50 }
54 @property(readonly, nonatomic) BOOL dismissed; 51 @property(readonly, nonatomic) BOOL dismissed;
55 @end 52 @end
56 53
57 #endif // CHROME_BROWSER_UI_COCOA_PASSWORDS_BASE_PASSWORDS_CONTROLLER_TEST_H_ 54 #endif // CHROME_BROWSER_UI_COCOA_PASSWORDS_BASE_PASSWORDS_CONTROLLER_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698