| 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/test/multiprocess_test.h" | 14 #include "base/test/multiprocess_test.h" |
| 15 #include "base/test/test_timeouts.h" | 15 #include "base/test/test_timeouts.h" |
| 16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
| 17 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" | 17 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" |
| 18 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.
h" | 18 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.
h" |
| 19 #include "chrome/browser/service/service_process_control.h" | 19 #include "chrome/browser/service/service_process_control.h" |
| 20 #include "chrome/browser/ui/startup/startup_browser_creator.h" | 20 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
| 21 #include "chrome/common/chrome_switches.h" | 21 #include "chrome/common/chrome_switches.h" |
| 22 #include "chrome/common/pref_names.h" | 22 #include "chrome/common/pref_names.h" |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 // No expectations on run_loop being true here; that would be a race | 543 // No expectations on run_loop being true here; that would be a race |
| 544 // condition. | 544 // condition. |
| 545 if (run_loop) | 545 if (run_loop) |
| 546 base::MessageLoop::current()->Run(); | 546 base::MessageLoop::current()->Run(); |
| 547 | 547 |
| 548 EXPECT_EQ("", prefs->GetString(prefs::kCloudPrintEmail)); | 548 EXPECT_EQ("", prefs->GetString(prefs::kCloudPrintEmail)); |
| 549 | 549 |
| 550 ShutdownAndWaitForExitWithTimeout(handle); | 550 ShutdownAndWaitForExitWithTimeout(handle); |
| 551 profile_manager.DeleteTestingProfile("StartBrowserWithPolicy"); | 551 profile_manager.DeleteTestingProfile("StartBrowserWithPolicy"); |
| 552 } | 552 } |
| OLD | NEW |