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

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

Issue 9703038: Profiles: Really fix refcounted services. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Forgot to save a file. >_< Created 8 years, 9 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 return cl; 443 return cl;
444 } 444 }
445 445
446 TEST_F(CloudPrintProxyPolicyStartupTest, StartAndShutdown) { 446 TEST_F(CloudPrintProxyPolicyStartupTest, StartAndShutdown) {
447 base::ProcessHandle handle = 447 base::ProcessHandle handle =
448 Launch("CloudPrintMockService_StartEnabledWaitForQuit"); 448 Launch("CloudPrintMockService_StartEnabledWaitForQuit");
449 WaitForConnect(); 449 WaitForConnect();
450 ShutdownAndWaitForExitWithTimeout(handle); 450 ShutdownAndWaitForExitWithTimeout(handle);
451 } 451 }
452 452
453 ProfileKeyedBase* CloudPrintProxyServiceFactoryForPolicyTest( 453 ProfileKeyedService* CloudPrintProxyServiceFactoryForPolicyTest(
454 Profile* profile) { 454 Profile* profile) {
455 CloudPrintProxyService* service = new CloudPrintProxyService(profile); 455 CloudPrintProxyService* service = new CloudPrintProxyService(profile);
456 service->Initialize(); 456 service->Initialize();
457 return service; 457 return service;
458 } 458 }
459 459
460 TEST_F(CloudPrintProxyPolicyStartupTest, StartBrowserWithoutPolicy) { 460 TEST_F(CloudPrintProxyPolicyStartupTest, StartBrowserWithoutPolicy) {
461 base::ProcessHandle handle = 461 base::ProcessHandle handle =
462 Launch("CloudPrintMockService_StartEnabledWaitForQuit"); 462 Launch("CloudPrintMockService_StartEnabledWaitForQuit");
463 463
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 // No expectations on run_loop being true here; that would be a race 532 // No expectations on run_loop being true here; that would be a race
533 // condition. 533 // condition.
534 if (run_loop) 534 if (run_loop)
535 MessageLoop::current()->Run(); 535 MessageLoop::current()->Run();
536 536
537 EXPECT_EQ("", prefs->GetString(prefs::kCloudPrintEmail)); 537 EXPECT_EQ("", prefs->GetString(prefs::kCloudPrintEmail));
538 538
539 ShutdownAndWaitForExitWithTimeout(handle); 539 ShutdownAndWaitForExitWithTimeout(handle);
540 profile_manager.DeleteTestingProfile("StartBrowserWithPolicy"); 540 profile_manager.DeleteTestingProfile("StartBrowserWithPolicy");
541 } 541 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698