| 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" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "chrome/common/chrome_switches.h" | 27 #include "chrome/common/chrome_switches.h" |
| 28 #include "chrome/common/pref_names.h" | 28 #include "chrome/common/pref_names.h" |
| 29 #include "chrome/common/service_messages.h" | 29 #include "chrome/common/service_messages.h" |
| 30 #include "chrome/common/service_process_util.h" | 30 #include "chrome/common/service_process_util.h" |
| 31 #include "chrome/service/service_ipc_server.h" | 31 #include "chrome/service/service_ipc_server.h" |
| 32 #include "chrome/service/service_process.h" | 32 #include "chrome/service/service_process.h" |
| 33 #include "chrome/test/base/chrome_unit_test_suite.h" | 33 #include "chrome/test/base/chrome_unit_test_suite.h" |
| 34 #include "chrome/test/base/test_launcher_utils.h" | 34 #include "chrome/test/base/test_launcher_utils.h" |
| 35 #include "chrome/test/base/testing_browser_process.h" | 35 #include "chrome/test/base/testing_browser_process.h" |
| 36 #include "chrome/test/base/testing_io_thread_state.h" | 36 #include "chrome/test/base/testing_io_thread_state.h" |
| 37 #include "chrome/test/base/testing_pref_service_syncable.h" | |
| 38 #include "chrome/test/base/testing_profile.h" | 37 #include "chrome/test/base/testing_profile.h" |
| 39 #include "chrome/test/base/testing_profile_manager.h" | 38 #include "chrome/test/base/testing_profile_manager.h" |
| 39 #include "components/syncable_prefs/testing_pref_service_syncable.h" |
| 40 #include "content/public/browser/notification_service.h" | 40 #include "content/public/browser/notification_service.h" |
| 41 #include "content/public/common/content_paths.h" | 41 #include "content/public/common/content_paths.h" |
| 42 #include "content/public/test/test_browser_thread_bundle.h" | 42 #include "content/public/test/test_browser_thread_bundle.h" |
| 43 #include "content/public/test/test_utils.h" | 43 #include "content/public/test/test_utils.h" |
| 44 #include "ipc/ipc_descriptors.h" | 44 #include "ipc/ipc_descriptors.h" |
| 45 #include "ipc/ipc_multiprocess_test.h" | 45 #include "ipc/ipc_multiprocess_test.h" |
| 46 #include "ipc/ipc_switches.h" | 46 #include "ipc/ipc_switches.h" |
| 47 #include "testing/gmock/include/gmock/gmock.h" | 47 #include "testing/gmock/include/gmock/gmock.h" |
| 48 #include "testing/gtest/include/gtest/gtest.h" | 48 #include "testing/gtest/include/gtest/gtest.h" |
| 49 #include "testing/multiprocess_func_list.h" | 49 #include "testing/multiprocess_func_list.h" |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 // LocalState for the BrowserProcess. Must be created before profiles are | 511 // LocalState for the BrowserProcess. Must be created before profiles are |
| 512 // constructed. | 512 // constructed. |
| 513 chrome::TestingIOThreadState testing_io_thread_state; | 513 chrome::TestingIOThreadState testing_io_thread_state; |
| 514 | 514 |
| 515 base::Process process = | 515 base::Process process = |
| 516 Launch("CloudPrintMockService_StartEnabledWaitForQuit"); | 516 Launch("CloudPrintMockService_StartEnabledWaitForQuit"); |
| 517 WaitForConnect(); | 517 WaitForConnect(); |
| 518 ShutdownAndWaitForExitWithTimeout(process.Pass()); | 518 ShutdownAndWaitForExitWithTimeout(process.Pass()); |
| 519 content::RunAllPendingInMessageLoop(); | 519 content::RunAllPendingInMessageLoop(); |
| 520 } | 520 } |
| OLD | NEW |