summaryrefslogtreecommitdiffstats
path: root/ipc/mojo
diff options
context:
space:
mode:
authorrvargas <rvargas@chromium.org>2015-01-12 14:23:23 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-12 22:25:04 +0000
commit07b589c1f6c4d0aac24e270a13fa83031bf2038c (patch)
tree18a5284042b77bb6845194277e8dea006576b636 /ipc/mojo
parentd44cce5915db087d726ed2e141896401edeb09b7 (diff)
downloadchromium_src-07b589c1f6c4d0aac24e270a13fa83031bf2038c.zip
chromium_src-07b589c1f6c4d0aac24e270a13fa83031bf2038c.tar.gz
chromium_src-07b589c1f6c4d0aac24e270a13fa83031bf2038c.tar.bz2
MultiProcessTest: Update SpawnChild* to return a Process.
We should not be dealing with raw handles. BUG=417532 Review URL: https://codereview.chromium.org/843113003 Cr-Commit-Position: refs/heads/master@{#311127}
Diffstat (limited to 'ipc/mojo')
-rw-r--r--ipc/mojo/ipc_channel_mojo_unittest.cc9
-rw-r--r--ipc/mojo/ipc_mojo_bootstrap_unittest.cc2
-rw-r--r--ipc/mojo/ipc_mojo_perftest.cc2
3 files changed, 7 insertions, 6 deletions
diff --git a/ipc/mojo/ipc_channel_mojo_unittest.cc b/ipc/mojo/ipc_channel_mojo_unittest.cc
index 2442afe..47e72fc 100644
--- a/ipc/mojo/ipc_channel_mojo_unittest.cc
+++ b/ipc/mojo/ipc_channel_mojo_unittest.cc
@@ -89,7 +89,7 @@ class IPCChannelMojoTest : public IPCTestBase {
bool DidStartClient() override {
bool ok = IPCTestBase::DidStartClient();
DCHECK(ok);
- host_->OnClientLaunched(client_process());
+ host_->OnClientLaunched(client_process().Handle());
return ok;
}
@@ -195,7 +195,7 @@ class IPCChannelMojoErrorTest : public IPCTestBase {
bool DidStartClient() override {
bool ok = IPCTestBase::DidStartClient();
DCHECK(ok);
- host_->OnClientLaunched(client_process());
+ host_->OnClientLaunched(client_process().Handle());
return ok;
}
@@ -269,10 +269,11 @@ class IPCChannelMojoDeadHandleTest : public IPCTestBase {
virtual bool DidStartClient() override {
IPCTestBase::DidStartClient();
- base::ProcessHandle client = client_process();
+ const base::ProcessHandle client = client_process().Handle();
// Forces GetFileHandleForProcess() fail. It happens occasionally
// in production, so we should exercise it somehow.
- ::CloseHandle(client);
+ // TODO(morrita): figure out how to safely test this.
+ // ::CloseHandle(client);
host_->OnClientLaunched(client);
return true;
}
diff --git a/ipc/mojo/ipc_mojo_bootstrap_unittest.cc b/ipc/mojo/ipc_mojo_bootstrap_unittest.cc
index a071d66..fbe0fa8 100644
--- a/ipc/mojo/ipc_mojo_bootstrap_unittest.cc
+++ b/ipc/mojo/ipc_mojo_bootstrap_unittest.cc
@@ -55,7 +55,7 @@ TEST_F(IPCMojoBootstrapTest, Connect) {
#else
ASSERT_TRUE(StartClient());
#endif
- bootstrap->OnClientLaunched(client_process());
+ bootstrap->OnClientLaunched(client_process().Handle());
base::MessageLoop::current()->Run();
diff --git a/ipc/mojo/ipc_mojo_perftest.cc b/ipc/mojo/ipc_mojo_perftest.cc
index 29e7839..8bdac8c9 100644
--- a/ipc/mojo/ipc_mojo_perftest.cc
+++ b/ipc/mojo/ipc_mojo_perftest.cc
@@ -40,7 +40,7 @@ public:
bool DidStartClient() override {
bool ok = IPCTestBase::DidStartClient();
DCHECK(ok);
- host_->OnClientLaunched(client_process());
+ host_->OnClientLaunched(client_process().Handle());
return ok;
}