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

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

Issue 9584044: Convert uses of int ms to TimeDelta in chrome/browser/printing. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 Value::CreateStringValue( 476 Value::CreateStringValue(
477 MockServiceIPCServer::EnabledUserId())); 477 MockServiceIPCServer::EnabledUserId()));
478 478
479 CommandLine command_line(CommandLine::NO_PROGRAM); 479 CommandLine command_line(CommandLine::NO_PROGRAM);
480 command_line.AppendSwitch(switches::kCheckCloudPrintConnectorPolicy); 480 command_line.AppendSwitch(switches::kCheckCloudPrintConnectorPolicy);
481 test_launcher_utils::PrepareBrowserCommandLineForTests(&command_line); 481 test_launcher_utils::PrepareBrowserCommandLineForTests(&command_line);
482 482
483 WaitForConnect(); 483 WaitForConnect();
484 MessageLoop::current()->PostDelayedTask(FROM_HERE, 484 MessageLoop::current()->PostDelayedTask(FROM_HERE,
485 MessageLoop::QuitClosure(), 485 MessageLoop::QuitClosure(),
486 TestTimeouts::action_timeout_ms()); 486 TestTimeouts::action_timeout());
487 487
488 bool run_loop = LaunchBrowser(command_line, profile); 488 bool run_loop = LaunchBrowser(command_line, profile);
489 EXPECT_FALSE(run_loop); 489 EXPECT_FALSE(run_loop);
490 if (run_loop) 490 if (run_loop)
491 MessageLoop::current()->Run(); 491 MessageLoop::current()->Run();
492 492
493 EXPECT_EQ(MockServiceIPCServer::EnabledUserId(), 493 EXPECT_EQ(MockServiceIPCServer::EnabledUserId(),
494 prefs->GetString(prefs::kCloudPrintEmail)); 494 prefs->GetString(prefs::kCloudPrintEmail));
495 495
496 ShutdownAndWaitForExitWithTimeout(handle); 496 ShutdownAndWaitForExitWithTimeout(handle);
(...skipping 21 matching lines...) Expand all
518 prefs->SetManagedPref(prefs::kCloudPrintProxyEnabled, 518 prefs->SetManagedPref(prefs::kCloudPrintProxyEnabled,
519 Value::CreateBooleanValue(false)); 519 Value::CreateBooleanValue(false));
520 520
521 CommandLine command_line(CommandLine::NO_PROGRAM); 521 CommandLine command_line(CommandLine::NO_PROGRAM);
522 command_line.AppendSwitch(switches::kCheckCloudPrintConnectorPolicy); 522 command_line.AppendSwitch(switches::kCheckCloudPrintConnectorPolicy);
523 test_launcher_utils::PrepareBrowserCommandLineForTests(&command_line); 523 test_launcher_utils::PrepareBrowserCommandLineForTests(&command_line);
524 524
525 WaitForConnect(); 525 WaitForConnect();
526 MessageLoop::current()->PostDelayedTask(FROM_HERE, 526 MessageLoop::current()->PostDelayedTask(FROM_HERE,
527 MessageLoop::QuitClosure(), 527 MessageLoop::QuitClosure(),
528 TestTimeouts::action_timeout_ms()); 528 TestTimeouts::action_timeout());
529 529
530 bool run_loop = LaunchBrowser(command_line, profile); 530 bool run_loop = LaunchBrowser(command_line, profile);
531 531
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698