Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(431)

Unified Diff: ipc/mojo/ipc_channel_mojo_unittest.cc

Issue 1054253005: ChannelMojo: Ensure that it always has ScopedIPCSupport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the ipc_fuzzer breakage Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ipc/mojo/ipc_channel_mojo_host.cc ('k') | ipc/mojo/ipc_mojo_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/mojo/ipc_channel_mojo_unittest.cc
diff --git a/ipc/mojo/ipc_channel_mojo_unittest.cc b/ipc/mojo/ipc_channel_mojo_unittest.cc
index 356d3b3acd110ab1835f89ca9849cd0ccdc8c4fa..bf70b7f6f8a631e8e8ed0156bf33311ee6fc332e 100644
--- a/ipc/mojo/ipc_channel_mojo_unittest.cc
+++ b/ipc/mojo/ipc_channel_mojo_unittest.cc
@@ -66,12 +66,9 @@ class ListenerThatExpectsOK : public IPC::Listener {
class ChannelClient {
public:
explicit ChannelClient(IPC::Listener* listener, const char* name) {
- ipc_support_.reset(
- new IPC::ScopedIPCSupport(main_message_loop_.task_runner()));
- channel_ = IPC::ChannelMojo::Create(NULL,
+ channel_ = IPC::ChannelMojo::Create(NULL, main_message_loop_.task_runner(),
IPCTestBase::GetChannelName(name),
- IPC::Channel::MODE_CLIENT,
- listener);
+ IPC::Channel::MODE_CLIENT, listener);
}
void Connect() {
@@ -90,7 +87,6 @@ class ChannelClient {
private:
base::MessageLoopForIO main_message_loop_;
- scoped_ptr<IPC::ScopedIPCSupport> ipc_support_;
scoped_ptr<IPC::ChannelMojo> channel_;
};
@@ -98,22 +94,17 @@ class IPCChannelMojoTestBase : public IPCTestBase {
public:
void InitWithMojo(const std::string& test_client_name) {
Init(test_client_name);
- ipc_support_.reset(new IPC::ScopedIPCSupport(task_runner()));
}
void TearDown() override {
// Make sure Mojo IPC support is properly shutdown on the I/O loop before
// TearDown continues.
- ipc_support_.reset();
base::RunLoop run_loop;
task_runner()->PostTask(FROM_HERE, run_loop.QuitClosure());
run_loop.Run();
IPCTestBase::TearDown();
}
-
- private:
- scoped_ptr<IPC::ScopedIPCSupport> ipc_support_;
};
class IPCChannelMojoTest : public IPCChannelMojoTestBase {
@@ -123,7 +114,7 @@ class IPCChannelMojoTest : public IPCChannelMojoTestBase {
base::SequencedTaskRunner* runner) override {
host_.reset(new IPC::ChannelMojoHost(task_runner()));
return IPC::ChannelMojo::CreateServerFactory(host_->channel_delegate(),
- handle);
+ task_runner(), handle);
}
bool DidStartClient() override {
@@ -231,7 +222,7 @@ class IPCChannelMojoErrorTest : public IPCChannelMojoTestBase {
base::SequencedTaskRunner* runner) override {
host_.reset(new IPC::ChannelMojoHost(task_runner()));
return IPC::ChannelMojo::CreateServerFactory(host_->channel_delegate(),
- handle);
+ task_runner(), handle);
}
bool DidStartClient() override {
@@ -565,7 +556,7 @@ class IPCChannelMojoDeadHandleTest : public IPCChannelMojoTestBase {
base::SequencedTaskRunner* runner) override {
host_.reset(new IPC::ChannelMojoHost(task_runner()));
return IPC::ChannelMojo::CreateServerFactory(host_->channel_delegate(),
- handle);
+ task_runner(), handle);
}
virtual bool DidStartClient() override {
« no previous file with comments | « ipc/mojo/ipc_channel_mojo_host.cc ('k') | ipc/mojo/ipc_mojo_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698