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

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

Issue 2459823002: [Sync] Rename syncable_prefs to sync_preferences. (Closed)
Patch Set: Created 4 years, 1 month 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 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/password_manager/chrome_password_manager_client.h" 5 #include "chrome/browser/password_manager/chrome_password_manager_client.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 17 matching lines...) Expand all
28 #include "components/password_manager/core/browser/log_router.h" 28 #include "components/password_manager/core/browser/log_router.h"
29 #include "components/password_manager/core/browser/password_manager_internals_se rvice.h" 29 #include "components/password_manager/core/browser/password_manager_internals_se rvice.h"
30 #include "components/password_manager/core/browser/password_manager_test_utils.h " 30 #include "components/password_manager/core/browser/password_manager_test_utils.h "
31 #include "components/password_manager/core/common/credential_manager_types.h" 31 #include "components/password_manager/core/common/credential_manager_types.h"
32 #include "components/password_manager/core/common/password_manager_features.h" 32 #include "components/password_manager/core/common/password_manager_features.h"
33 #include "components/password_manager/core/common/password_manager_pref_names.h" 33 #include "components/password_manager/core/common/password_manager_pref_names.h"
34 #include "components/prefs/pref_registry_simple.h" 34 #include "components/prefs/pref_registry_simple.h"
35 #include "components/prefs/pref_service.h" 35 #include "components/prefs/pref_service.h"
36 #include "components/prefs/testing_pref_service.h" 36 #include "components/prefs/testing_pref_service.h"
37 #include "components/sessions/content/content_record_password_state.h" 37 #include "components/sessions/content/content_record_password_state.h"
38 #include "components/syncable_prefs/testing_pref_service_syncable.h" 38 #include "components/sync_preferences/testing_pref_service_syncable.h"
39 #include "components/version_info/version_info.h" 39 #include "components/version_info/version_info.h"
40 #include "content/public/browser/browser_context.h" 40 #include "content/public/browser/browser_context.h"
41 #include "content/public/browser/web_contents.h" 41 #include "content/public/browser/web_contents.h"
42 #include "content/public/test/web_contents_tester.h" 42 #include "content/public/test/web_contents_tester.h"
43 #include "mojo/public/cpp/bindings/binding.h" 43 #include "mojo/public/cpp/bindings/binding.h"
44 #include "services/service_manager/public/cpp/interface_provider.h" 44 #include "services/service_manager/public/cpp/interface_provider.h"
45 #include "testing/gmock/include/gmock/gmock.h" 45 #include "testing/gmock/include/gmock/gmock.h"
46 #include "testing/gtest/include/gtest/gtest.h" 46 #include "testing/gtest/include/gtest/gtest.h"
47 47
48 using browser_sync::ProfileSyncServiceMock; 48 using browser_sync::ProfileSyncServiceMock;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 } // namespace 141 } // namespace
142 142
143 class ChromePasswordManagerClientTest : public ChromeRenderViewHostTestHarness { 143 class ChromePasswordManagerClientTest : public ChromeRenderViewHostTestHarness {
144 public: 144 public:
145 ChromePasswordManagerClientTest() 145 ChromePasswordManagerClientTest()
146 : field_trial_list_(nullptr), metrics_enabled_(false) {} 146 : field_trial_list_(nullptr), metrics_enabled_(false) {}
147 void SetUp() override; 147 void SetUp() override;
148 void TearDown() override; 148 void TearDown() override;
149 149
150 syncable_prefs::TestingPrefServiceSyncable* prefs() { 150 sync_preferences::TestingPrefServiceSyncable* prefs() {
151 return profile()->GetTestingPrefService(); 151 return profile()->GetTestingPrefService();
152 } 152 }
153 153
154 void EnforcePasswordManagerSettingsBehaviourChangeExperimentGroup( 154 void EnforcePasswordManagerSettingsBehaviourChangeExperimentGroup(
155 const char* name) { 155 const char* name) {
156 ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial( 156 ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial(
157 kPasswordManagerSettingsBehaviourChangeFieldTrialName, name)); 157 kPasswordManagerSettingsBehaviourChangeFieldTrialName, name));
158 } 158 }
159 159
160 // Caller does not own the returned pointer. 160 // Caller does not own the returned pointer.
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 // In particular, this WebContent should not have the 564 // In particular, this WebContent should not have the
565 // ChromePasswordManagerClient. 565 // ChromePasswordManagerClient.
566 ASSERT_FALSE( 566 ASSERT_FALSE(
567 ChromePasswordManagerClient::FromWebContents(web_contents.get())); 567 ChromePasswordManagerClient::FromWebContents(web_contents.get()));
568 568
569 // This call should not crash. 569 // This call should not crash.
570 ChromePasswordManagerClient::BindCredentialManager( 570 ChromePasswordManagerClient::BindCredentialManager(
571 web_contents->GetMainFrame(), 571 web_contents->GetMainFrame(),
572 password_manager::mojom::CredentialManagerRequest()); 572 password_manager::mojom::CredentialManagerRequest());
573 } 573 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698