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

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

Issue 1142693003: Implement the chrome.passwordsPrivate API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stevenjb comment. Created 5 years, 6 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 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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/passwords/password_manager_presenter.cc ('k') | chrome/browser/ui/passwords/password_ui_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698