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

Side by Side Diff: chrome/browser/printing/cloud_print/cloud_print_proxy_service_unittest.cc

Issue 11413050: chrome/browser: Update calls from RunAllPending() to RunUntilIdle(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | 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 #include <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" 10 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 } 422 }
423 423
424 ProfileKeyedService* TestCloudPrintProxyServiceFactory(Profile* profile) { 424 ProfileKeyedService* TestCloudPrintProxyServiceFactory(Profile* profile) {
425 TestCloudPrintProxyService* service = new TestCloudPrintProxyService(profile); 425 TestCloudPrintProxyService* service = new TestCloudPrintProxyService(profile);
426 426
427 service->GetMockServiceProcessControl()->SetConnectSuccessMockExpectations( 427 service->GetMockServiceProcessControl()->SetConnectSuccessMockExpectations(
428 MockServiceProcessControl::kServiceStateEnabled, true); 428 MockServiceProcessControl::kServiceStateEnabled, true);
429 service->GetMockServiceProcessControl()->SetWillBeDisabledExpectations(); 429 service->GetMockServiceProcessControl()->SetWillBeDisabledExpectations();
430 430
431 service->Initialize(); 431 service->Initialize();
432 MessageLoop::current()->RunAllPending(); 432 MessageLoop::current()->RunUntilIdle();
433 return service; 433 return service;
434 } 434 }
435 435
436 TEST_F(CloudPrintProxyPolicyTest, StartupBrowserCreatorWithCommandLine) { 436 TEST_F(CloudPrintProxyPolicyTest, StartupBrowserCreatorWithCommandLine) {
437 TestingPrefService* prefs = profile_.GetTestingPrefService(); 437 TestingPrefService* prefs = profile_.GetTestingPrefService();
438 prefs->SetUserPref(prefs::kCloudPrintEmail, 438 prefs->SetUserPref(prefs::kCloudPrintEmail,
439 Value::CreateStringValue(std::string())); 439 Value::CreateStringValue(std::string()));
440 prefs->SetManagedPref(prefs::kCloudPrintProxyEnabled, 440 prefs->SetManagedPref(prefs::kCloudPrintProxyEnabled,
441 Value::CreateBooleanValue(false)); 441 Value::CreateBooleanValue(false));
442 442
443 CloudPrintProxyServiceFactory::GetInstance()-> 443 CloudPrintProxyServiceFactory::GetInstance()->
444 SetTestingFactory(&profile_, TestCloudPrintProxyServiceFactory); 444 SetTestingFactory(&profile_, TestCloudPrintProxyServiceFactory);
445 445
446 CommandLine command_line(CommandLine::NO_PROGRAM); 446 CommandLine command_line(CommandLine::NO_PROGRAM);
447 command_line.AppendSwitch(switches::kCheckCloudPrintConnectorPolicy); 447 command_line.AppendSwitch(switches::kCheckCloudPrintConnectorPolicy);
448 448
449 EXPECT_FALSE(LaunchBrowser(command_line, &profile_)); 449 EXPECT_FALSE(LaunchBrowser(command_line, &profile_));
450 MessageLoop::current()->RunAllPending(); 450 MessageLoop::current()->RunUntilIdle();
451 } 451 }
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_tracker_unittest.cc ('k') | chrome/browser/printing/print_dialog_cloud_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698