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

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.cc

Issue 438893002: Add ManagePasswordItemViewController and unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix constants in test 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
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 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h" 5 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h"
6 6
7 #include "content/public/browser/web_contents.h" 7 #include "content/public/browser/web_contents.h"
8 8
9 ManagePasswordsUIControllerMock::ManagePasswordsUIControllerMock( 9 ManagePasswordsUIControllerMock::ManagePasswordsUIControllerMock(
10 content::WebContents* contents) 10 content::WebContents* contents)
(...skipping 10 matching lines...) Expand all
21 void ManagePasswordsUIControllerMock:: 21 void ManagePasswordsUIControllerMock::
22 NavigateToPasswordManagerSettingsPage() { 22 NavigateToPasswordManagerSettingsPage() {
23 navigated_to_settings_page_ = true; 23 navigated_to_settings_page_ = true;
24 } 24 }
25 25
26 const autofill::PasswordForm& 26 const autofill::PasswordForm&
27 ManagePasswordsUIControllerMock::PendingCredentials() const { 27 ManagePasswordsUIControllerMock::PendingCredentials() const {
28 return pending_credentials_; 28 return pending_credentials_;
29 } 29 }
30 30
31 void ManagePasswordsUIControllerMock::SetPendingCredentials(
32 autofill::PasswordForm pending_credentials) {
33 pending_credentials_ = pending_credentials;
34 }
35
31 bool ManagePasswordsUIControllerMock::IsInstalled() const { 36 bool ManagePasswordsUIControllerMock::IsInstalled() const {
32 return web_contents()->GetUserData(UserDataKey()) == this; 37 return web_contents()->GetUserData(UserDataKey()) == this;
33 } 38 }
34 39
35 void ManagePasswordsUIControllerMock::SavePasswordInternal() { 40 void ManagePasswordsUIControllerMock::SavePasswordInternal() {
36 saved_password_ = true; 41 saved_password_ = true;
37 } 42 }
38 43
39 void ManagePasswordsUIControllerMock::NeverSavePasswordInternal() { 44 void ManagePasswordsUIControllerMock::NeverSavePasswordInternal() {
40 never_saved_password_ = true; 45 never_saved_password_ = true;
41 } 46 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698