| 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 #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 "components/password_manager/content/common/credential_manager_types.h" | 7 #include "components/password_manager/content/common/credential_manager_types.h" |
| 8 #include "content/public/browser/web_contents.h" | 8 #include "content/public/browser/web_contents.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 void ManagePasswordsUIControllerMock::SetPendingPassword( | 37 void ManagePasswordsUIControllerMock::SetPendingPassword( |
| 38 autofill::PasswordForm pending_password) { | 38 autofill::PasswordForm pending_password) { |
| 39 pending_password_ = pending_password; | 39 pending_password_ = pending_password; |
| 40 } | 40 } |
| 41 | 41 |
| 42 void ManagePasswordsUIControllerMock::UpdateBubbleAndIconVisibility() { | 42 void ManagePasswordsUIControllerMock::UpdateBubbleAndIconVisibility() { |
| 43 ManagePasswordsUIController::UpdateBubbleAndIconVisibility(); | 43 ManagePasswordsUIController::UpdateBubbleAndIconVisibility(); |
| 44 OnBubbleShown(); | 44 OnBubbleShown(); |
| 45 } | 45 } |
| 46 | 46 |
| 47 void ManagePasswordsUIControllerMock:: |
| 48 UpdateAndroidAccountChooserInfoBarVisibility() { |
| 49 OnBubbleShown(); |
| 50 } |
| 51 |
| 47 base::TimeDelta ManagePasswordsUIControllerMock::Elapsed() const { | 52 base::TimeDelta ManagePasswordsUIControllerMock::Elapsed() const { |
| 48 return elapsed_; | 53 return elapsed_; |
| 49 } | 54 } |
| 50 | 55 |
| 51 bool ManagePasswordsUIControllerMock::IsInstalled() const { | 56 bool ManagePasswordsUIControllerMock::IsInstalled() const { |
| 52 return web_contents()->GetUserData(UserDataKey()) == this; | 57 return web_contents()->GetUserData(UserDataKey()) == this; |
| 53 } | 58 } |
| 54 | 59 |
| 55 void ManagePasswordsUIControllerMock::SavePasswordInternal() { | 60 void ManagePasswordsUIControllerMock::SavePasswordInternal() { |
| 56 saved_password_ = true; | 61 saved_password_ = true; |
| 57 } | 62 } |
| 58 | 63 |
| 59 void ManagePasswordsUIControllerMock::NeverSavePasswordInternal() { | 64 void ManagePasswordsUIControllerMock::NeverSavePasswordInternal() { |
| 60 never_saved_password_ = true; | 65 never_saved_password_ = true; |
| 61 } | 66 } |
| 62 | 67 |
| 63 void ManagePasswordsUIControllerMock::ChooseCredential( | 68 void ManagePasswordsUIControllerMock::ChooseCredential( |
| 64 const autofill::PasswordForm& form, | 69 const autofill::PasswordForm& form, |
| 65 password_manager::CredentialType form_type) { | 70 password_manager::CredentialType form_type) { |
| 66 EXPECT_FALSE(choose_credential_); | 71 EXPECT_FALSE(choose_credential_); |
| 67 choose_credential_ = true; | 72 choose_credential_ = true; |
| 68 } | 73 } |
| OLD | NEW |