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

Side by Side Diff: chrome/browser/password_manager/save_password_infobar_delegate_unittest.cc

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/password_manager/save_password_infobar_delegate.h" 5 #include "chrome/browser/password_manager/save_password_infobar_delegate.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/prefs/pref_service.h"
12 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
13 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 13 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
15 #include "components/autofill/core/common/password_form.h" 14 #include "components/autofill/core/common/password_form.h"
16 #include "components/password_manager/core/browser/password_form_manager.h" 15 #include "components/password_manager/core/browser/password_form_manager.h"
17 #include "components/password_manager/core/browser/password_manager.h" 16 #include "components/password_manager/core/browser/password_manager.h"
18 #include "components/password_manager/core/browser/stub_password_manager_client. h" 17 #include "components/password_manager/core/browser/stub_password_manager_client. h"
19 #include "components/password_manager/core/browser/stub_password_manager_driver. h" 18 #include "components/password_manager/core/browser/stub_password_manager_driver. h"
20 #include "components/password_manager/core/common/password_manager_pref_names.h" 19 #include "components/password_manager/core/common/password_manager_pref_names.h"
20 #include "components/prefs/pref_service.h"
21 #include "content/public/browser/web_contents.h" 21 #include "content/public/browser/web_contents.h"
22 #include "testing/gmock/include/gmock/gmock.h" 22 #include "testing/gmock/include/gmock/gmock.h"
23 #include "testing/gtest/include/gtest/gtest.h" 23 #include "testing/gtest/include/gtest/gtest.h"
24 24
25 namespace { 25 namespace {
26 26
27 class MockPasswordFormManager : public password_manager::PasswordFormManager { 27 class MockPasswordFormManager : public password_manager::PasswordFormManager {
28 public: 28 public:
29 MOCK_METHOD0(PermanentlyBlacklist, void()); 29 MOCK_METHOD0(PermanentlyBlacklist, void());
30 30
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 password_manager::prefs::kWasSavePrompFirstRunExperienceShown, false); 164 password_manager::prefs::kWasSavePrompFirstRunExperienceShown, false);
165 scoped_ptr<MockPasswordFormManager> password_form_manager( 165 scoped_ptr<MockPasswordFormManager> password_form_manager(
166 CreateMockFormManager()); 166 CreateMockFormManager());
167 scoped_ptr<ConfirmInfoBarDelegate> infobar( 167 scoped_ptr<ConfirmInfoBarDelegate> infobar(
168 CreateDelegate(std::move(password_form_manager), false)); 168 CreateDelegate(std::move(password_form_manager), false));
169 EXPECT_TRUE(infobar->Cancel()); 169 EXPECT_TRUE(infobar->Cancel());
170 infobar.reset(); 170 infobar.reset();
171 EXPECT_FALSE(prefs()->GetBoolean( 171 EXPECT_FALSE(prefs()->GetBoolean(
172 password_manager::prefs::kWasSavePrompFirstRunExperienceShown)); 172 password_manager::prefs::kWasSavePrompFirstRunExperienceShown));
173 } 173 }
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/password_store_x_unittest.cc ('k') | chrome/browser/pepper_broker_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698