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

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

Issue 2420253002: Rename shell namespace to service_manager (Closed)
Patch Set: . Created 4 years, 2 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 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 FakePasswordAutofillAgent fake_agent_; 191 FakePasswordAutofillAgent fake_agent_;
192 192
193 TestingPrefServiceSimple prefs_; 193 TestingPrefServiceSimple prefs_;
194 base::FieldTrialList field_trial_list_; 194 base::FieldTrialList field_trial_list_;
195 bool metrics_enabled_; 195 bool metrics_enabled_;
196 }; 196 };
197 197
198 void ChromePasswordManagerClientTest::SetUp() { 198 void ChromePasswordManagerClientTest::SetUp() {
199 ChromeRenderViewHostTestHarness::SetUp(); 199 ChromeRenderViewHostTestHarness::SetUp();
200 200
201 shell::InterfaceProvider* remote_interfaces = 201 service_manager::InterfaceProvider* remote_interfaces =
202 web_contents()->GetMainFrame()->GetRemoteInterfaces(); 202 web_contents()->GetMainFrame()->GetRemoteInterfaces();
203 shell::InterfaceProvider::TestApi test_api(remote_interfaces); 203 service_manager::InterfaceProvider::TestApi test_api(remote_interfaces);
204 test_api.SetBinderForName(autofill::mojom::PasswordAutofillAgent::Name_, 204 test_api.SetBinderForName(autofill::mojom::PasswordAutofillAgent::Name_,
205 base::Bind(&FakePasswordAutofillAgent::BindRequest, 205 base::Bind(&FakePasswordAutofillAgent::BindRequest,
206 base::Unretained(&fake_agent_))); 206 base::Unretained(&fake_agent_)));
207 207
208 prefs_.registry()->RegisterBooleanPref( 208 prefs_.registry()->RegisterBooleanPref(
209 password_manager::prefs::kPasswordManagerSavingEnabled, true); 209 password_manager::prefs::kPasswordManagerSavingEnabled, true);
210 ChromePasswordManagerClient::CreateForWebContentsWithAutofillClient( 210 ChromePasswordManagerClient::CreateForWebContentsWithAutofillClient(
211 web_contents(), nullptr); 211 web_contents(), nullptr);
212 212
213 // Connect our bool for testing. 213 // Connect our bool for testing.
(...skipping 350 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