| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/process_util.h" | 5 #include "base/process_util.h" |
| 6 #include "base/test/test_timeouts.h" | 6 #include "base/test/test_timeouts.h" |
| 7 #include "chrome/browser/service/service_process_control.h" | 7 #include "chrome/browser/service/service_process_control.h" |
| 8 #include "chrome/browser/service/service_process_control_manager.h" | 8 #include "chrome/browser/service/service_process_control_manager.h" |
| 9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 10 #include "chrome/common/chrome_version_info.h" | 10 #include "chrome/common/chrome_version_info.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 ServiceProcessControl* process() { return process_; } | 92 ServiceProcessControl* process() { return process_; } |
| 93 | 93 |
| 94 private: | 94 private: |
| 95 ServiceProcessControl* process_; | 95 ServiceProcessControl* process_; |
| 96 base::ProcessHandle service_process_handle_; | 96 base::ProcessHandle service_process_handle_; |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 #if defined(OS_WIN) | 99 #if defined(OS_WIN) |
| 100 // They way that the IPC is implemented only works on windows. This has to | 100 // They way that the IPC is implemented only works on windows. This has to |
| 101 // change when we implement a different scheme for IPC. | 101 // change when we implement a different scheme for IPC. |
| 102 IN_PROC_BROWSER_TEST_F(ServiceProcessControlBrowserTest, LaunchAndIPC) { | 102 // Times out flakily, http://crbug.com/70076. |
| 103 IN_PROC_BROWSER_TEST_F(ServiceProcessControlBrowserTest, |
| 104 DISABLED_LaunchAndIPC) { |
| 103 LaunchServiceProcessControl(); | 105 LaunchServiceProcessControl(); |
| 104 | 106 |
| 105 // Make sure we are connected to the service process. | 107 // Make sure we are connected to the service process. |
| 106 EXPECT_TRUE(process()->is_connected()); | 108 EXPECT_TRUE(process()->is_connected()); |
| 107 SendRequestAndWait(); | 109 SendRequestAndWait(); |
| 108 | 110 |
| 109 // And then shutdown the service process. | 111 // And then shutdown the service process. |
| 110 EXPECT_TRUE(process()->Shutdown()); | 112 EXPECT_TRUE(process()->Shutdown()); |
| 111 } | 113 } |
| 112 | 114 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 IN_PROC_BROWSER_TEST_F(ServiceProcessControlBrowserTest, CheckPid) { | 199 IN_PROC_BROWSER_TEST_F(ServiceProcessControlBrowserTest, CheckPid) { |
| 198 EXPECT_EQ(0, GetServiceProcessPid()); | 200 EXPECT_EQ(0, GetServiceProcessPid()); |
| 199 // Launch the service process. | 201 // Launch the service process. |
| 200 LaunchServiceProcessControl(); | 202 LaunchServiceProcessControl(); |
| 201 EXPECT_NE(static_cast<base::ProcessId>(0), GetServiceProcessPid()); | 203 EXPECT_NE(static_cast<base::ProcessId>(0), GetServiceProcessPid()); |
| 202 } | 204 } |
| 203 | 205 |
| 204 #endif | 206 #endif |
| 205 | 207 |
| 206 DISABLE_RUNNABLE_METHOD_REFCOUNT(ServiceProcessControlBrowserTest); | 208 DISABLE_RUNNABLE_METHOD_REFCOUNT(ServiceProcessControlBrowserTest); |
| OLD | NEW |