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

Unified Diff: mojo/system/remote_message_pipe_posix_unittest.cc

Issue 134373005: Mojo: Refactor PlatformChannel stuff. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | « mojo/system/raw_channel_posix_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/remote_message_pipe_posix_unittest.cc
diff --git a/mojo/system/remote_message_pipe_posix_unittest.cc b/mojo/system/remote_message_pipe_posix_unittest.cc
index e3ce3d9b91085aad0541324b54e1504b47a9465b..758f7f61ab2bea4b8191673da9ee5e788f0b89a3 100644
--- a/mojo/system/remote_message_pipe_posix_unittest.cc
+++ b/mojo/system/remote_message_pipe_posix_unittest.cc
@@ -91,17 +91,13 @@ class RemoteMessagePipeTest : public testing::Test {
void SetUpOnIOThread() {
CHECK_EQ(base::MessageLoop::current(), io_thread_message_loop());
- scoped_ptr<PlatformServerChannel> server_channel(
- PlatformServerChannel::Create("channel"));
- CHECK(server_channel.get());
- CHECK(server_channel->is_valid());
- scoped_ptr<PlatformClientChannel> client_channel(
- server_channel->CreateClientChannel());
- CHECK(client_channel.get());
- CHECK(client_channel->is_valid());
-
- platform_channels_[0] = server_channel.PassAs<PlatformChannel>();
- platform_channels_[1] = client_channel.PassAs<PlatformChannel>();
+ PlatformChannelPair channel_pair;
+ platform_channels_[0] = channel_pair.CreateServerChannel();
+ CHECK(platform_channels_[0].get());
+ CHECK(platform_channels_[0]->is_valid());
+ platform_channels_[1] = channel_pair.CreateClientChannel();
+ CHECK(platform_channels_[1].get());
+ CHECK(platform_channels_[1]->is_valid());
}
void CreateAndInitChannel(unsigned channel_index) {
« no previous file with comments | « mojo/system/raw_channel_posix_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698