OLD | NEW |
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" |
11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "base/process_util.h" | 12 #include "base/process/kill.h" |
13 #include "base/rand_util.h" | 13 #include "base/rand_util.h" |
14 #include "base/synchronization/waitable_event.h" | 14 #include "base/synchronization/waitable_event.h" |
15 #include "base/test/multiprocess_test.h" | 15 #include "base/test/multiprocess_test.h" |
16 #include "base/test/test_timeouts.h" | 16 #include "base/test/test_timeouts.h" |
17 #include "base/time/default_tick_clock.h" | 17 #include "base/time/default_tick_clock.h" |
18 #include "base/time/time.h" | 18 #include "base/time/time.h" |
19 #include "chrome/browser/prefs/browser_prefs.h" | 19 #include "chrome/browser/prefs/browser_prefs.h" |
20 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" | 20 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" |
21 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.
h" | 21 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.
h" |
22 #include "chrome/browser/service/service_process_control.h" | 22 #include "chrome/browser/service/service_process_control.h" |
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 // condition. | 595 // condition. |
596 if (should_run_loop) | 596 if (should_run_loop) |
597 run_loop.Run(); | 597 run_loop.Run(); |
598 | 598 |
599 EXPECT_EQ("", prefs->GetString(prefs::kCloudPrintEmail)); | 599 EXPECT_EQ("", prefs->GetString(prefs::kCloudPrintEmail)); |
600 | 600 |
601 ShutdownAndWaitForExitWithTimeout(handle); | 601 ShutdownAndWaitForExitWithTimeout(handle); |
602 content::RunAllPendingInMessageLoop(); | 602 content::RunAllPendingInMessageLoop(); |
603 profile_manager.DeleteTestingProfile("StartBrowserWithPolicy"); | 603 profile_manager.DeleteTestingProfile("StartBrowserWithPolicy"); |
604 } | 604 } |
OLD | NEW |