| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/strings/utf_string_conversions.h" | 5 #include "base/strings/utf_string_conversions.h" |
| 6 #include "chrome/browser/password_manager/mock_password_store_service.h" | 6 #include "chrome/browser/password_manager/mock_password_store_service.h" |
| 7 #include "chrome/browser/password_manager/password_store_factory.h" | 7 #include "chrome/browser/password_manager/password_store_factory.h" |
| 8 #include "chrome/browser/ui/passwords/password_manager_presenter.h" | 8 #include "chrome/browser/ui/passwords/password_manager_presenter.h" |
| 9 #include "chrome/browser/ui/passwords/password_ui_view.h" | 9 #include "chrome/browser/ui/passwords/password_ui_view.h" |
| 10 #include "chrome/test/base/testing_profile.h" | 10 #include "chrome/test/base/testing_profile.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 public: | 21 public: |
| 22 explicit MockPasswordUIView(Profile* profile) | 22 explicit MockPasswordUIView(Profile* profile) |
| 23 : profile_(profile), password_manager_presenter_(this) { | 23 : profile_(profile), password_manager_presenter_(this) { |
| 24 password_manager_presenter_.Initialize(); | 24 password_manager_presenter_.Initialize(); |
| 25 } | 25 } |
| 26 ~MockPasswordUIView() override {} | 26 ~MockPasswordUIView() override {} |
| 27 Profile* GetProfile() override; | 27 Profile* GetProfile() override; |
| 28 #if !defined(OS_ANDROID) | 28 #if !defined(OS_ANDROID) |
| 29 gfx::NativeWindow GetNativeWindow() const override; | 29 gfx::NativeWindow GetNativeWindow() const override; |
| 30 #endif | 30 #endif |
| 31 MOCK_METHOD2(ShowPassword, void(size_t, const base::string16&)); | 31 MOCK_METHOD4(ShowPassword, void( |
| 32 size_t, const std::string&, const std::string&, const base::string16&)); |
| 32 MOCK_METHOD2(SetPasswordList, | 33 MOCK_METHOD2(SetPasswordList, |
| 33 void(const ScopedVector<autofill::PasswordForm>&, bool)); | 34 void(const ScopedVector<autofill::PasswordForm>&, bool)); |
| 34 MOCK_METHOD1(SetPasswordExceptionList, | 35 MOCK_METHOD1(SetPasswordExceptionList, |
| 35 void(const ScopedVector<autofill::PasswordForm>&)); | 36 void(const ScopedVector<autofill::PasswordForm>&)); |
| 36 PasswordManagerPresenter* GetPasswordManagerPresenter() { | 37 PasswordManagerPresenter* GetPasswordManagerPresenter() { |
| 37 return &password_manager_presenter_; | 38 return &password_manager_presenter_; |
| 38 } | 39 } |
| 39 | 40 |
| 40 private: | 41 private: |
| 41 Profile* profile_; | 42 Profile* profile_; |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 SetPasswordList( | 142 SetPasswordList( |
| 142 Property(&ScopedVector<autofill::PasswordForm>::size, Eq(2u)), | 143 Property(&ScopedVector<autofill::PasswordForm>::size, Eq(2u)), |
| 143 testing::_)); | 144 testing::_)); |
| 144 EXPECT_CALL(*GetUIController(), | 145 EXPECT_CALL(*GetUIController(), |
| 145 SetPasswordExceptionList(Property( | 146 SetPasswordExceptionList(Property( |
| 146 &ScopedVector<autofill::PasswordForm>::size, Eq(1u)))); | 147 &ScopedVector<autofill::PasswordForm>::size, Eq(1u)))); |
| 147 UpdateLists(); | 148 UpdateLists(); |
| 148 } | 149 } |
| 149 | 150 |
| 150 } // namespace | 151 } // namespace |
| OLD | NEW |