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

Side by Side Diff: chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc

Issue 15517005: Remove references to Profile from browser_context_keyed_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & style Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Create a service process that uses a Mock to respond to the browser in order 5 // Create a service process that uses a Mock to respond to the browser in order
6 // to test launching the browser using the cloud print policy check command 6 // to test launching the browser using the cloud print policy check command
7 // line switch. 7 // line switch.
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 return cl; 448 return cl;
449 } 449 }
450 450
451 TEST_F(CloudPrintProxyPolicyStartupTest, StartAndShutdown) { 451 TEST_F(CloudPrintProxyPolicyStartupTest, StartAndShutdown) {
452 base::ProcessHandle handle = 452 base::ProcessHandle handle =
453 Launch("CloudPrintMockService_StartEnabledWaitForQuit"); 453 Launch("CloudPrintMockService_StartEnabledWaitForQuit");
454 WaitForConnect(); 454 WaitForConnect();
455 ShutdownAndWaitForExitWithTimeout(handle); 455 ShutdownAndWaitForExitWithTimeout(handle);
456 } 456 }
457 457
458 ProfileKeyedService* CloudPrintProxyServiceFactoryForPolicyTest( 458 BrowserContextKeyedService* CloudPrintProxyServiceFactoryForPolicyTest(
459 content::BrowserContext* profile) { 459 content::BrowserContext* profile) {
460 CloudPrintProxyService* service = 460 CloudPrintProxyService* service =
461 new CloudPrintProxyService(static_cast<Profile*>(profile)); 461 new CloudPrintProxyService(static_cast<Profile*>(profile));
462 service->Initialize(); 462 service->Initialize();
463 return service; 463 return service;
464 } 464 }
465 465
466 TEST_F(CloudPrintProxyPolicyStartupTest, StartBrowserWithoutPolicy) { 466 TEST_F(CloudPrintProxyPolicyStartupTest, StartBrowserWithoutPolicy) {
467 base::ProcessHandle handle = 467 base::ProcessHandle handle =
468 Launch("CloudPrintMockService_StartEnabledWaitForQuit"); 468 Launch("CloudPrintMockService_StartEnabledWaitForQuit");
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 // No expectations on run_loop being true here; that would be a race 538 // No expectations on run_loop being true here; that would be a race
539 // condition. 539 // condition.
540 if (run_loop) 540 if (run_loop)
541 MessageLoop::current()->Run(); 541 MessageLoop::current()->Run();
542 542
543 EXPECT_EQ("", prefs->GetString(prefs::kCloudPrintEmail)); 543 EXPECT_EQ("", prefs->GetString(prefs::kCloudPrintEmail));
544 544
545 ShutdownAndWaitForExitWithTimeout(handle); 545 ShutdownAndWaitForExitWithTimeout(handle);
546 profile_manager.DeleteTestingProfile("StartBrowserWithPolicy"); 546 profile_manager.DeleteTestingProfile("StartBrowserWithPolicy");
547 } 547 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698