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

Unified Diff: mojo/system/channel_unittest.cc

Issue 505863002: Mojo: Add static factory functions to MessagePipe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years, 4 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 | « no previous file | mojo/system/core.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/channel_unittest.cc
diff --git a/mojo/system/channel_unittest.cc b/mojo/system/channel_unittest.cc
index dbb7de8f4f7bc373c93cd9f7ceca47e82ae21788..bdde6f603d923c0b2ed26dee31863f8b66a84cc9 100644
--- a/mojo/system/channel_unittest.cc
+++ b/mojo/system/channel_unittest.cc
@@ -9,10 +9,8 @@
#include "base/message_loop/message_loop.h"
#include "mojo/embedder/platform_channel_pair.h"
#include "mojo/embedder/simple_platform_support.h"
-#include "mojo/system/local_message_pipe_endpoint.h"
#include "mojo/system/message_in_transit.h"
#include "mojo/system/message_pipe.h"
-#include "mojo/system/proxy_message_pipe_endpoint.h"
#include "mojo/system/raw_channel.h"
#include "mojo/system/test_utils.h"
#include "mojo/system/waiter.h"
@@ -194,9 +192,7 @@ TEST_F(ChannelTest, CloseBeforeRun) {
base::Bind(&ChannelTest::InitChannelOnIOThread, base::Unretained(this)));
EXPECT_EQ(TRISTATE_TRUE, init_result());
- scoped_refptr<MessagePipe> mp(new MessagePipe(
- scoped_ptr<MessagePipeEndpoint>(new LocalMessagePipeEndpoint()),
- scoped_ptr<MessagePipeEndpoint>(new ProxyMessagePipeEndpoint())));
+ scoped_refptr<MessagePipe> mp(MessagePipe::CreateLocalProxy());
MessageInTransit::EndpointId local_id =
channel()->AttachMessagePipeEndpoint(mp, 1);
@@ -234,9 +230,7 @@ TEST_F(ChannelTest, ShutdownAfterAttach) {
base::Bind(&ChannelTest::InitChannelOnIOThread, base::Unretained(this)));
EXPECT_EQ(TRISTATE_TRUE, init_result());
- scoped_refptr<MessagePipe> mp(new MessagePipe(
- scoped_ptr<MessagePipeEndpoint>(new LocalMessagePipeEndpoint()),
- scoped_ptr<MessagePipeEndpoint>(new ProxyMessagePipeEndpoint())));
+ scoped_refptr<MessagePipe> mp(MessagePipe::CreateLocalProxy());
MessageInTransit::EndpointId local_id =
channel()->AttachMessagePipeEndpoint(mp, 1);
@@ -286,9 +280,7 @@ TEST_F(ChannelTest, WaitAfterAttachRunAndShutdown) {
base::Bind(&ChannelTest::InitChannelOnIOThread, base::Unretained(this)));
EXPECT_EQ(TRISTATE_TRUE, init_result());
- scoped_refptr<MessagePipe> mp(new MessagePipe(
- scoped_ptr<MessagePipeEndpoint>(new LocalMessagePipeEndpoint()),
- scoped_ptr<MessagePipeEndpoint>(new ProxyMessagePipeEndpoint())));
+ scoped_refptr<MessagePipe> mp(MessagePipe::CreateLocalProxy());
MessageInTransit::EndpointId local_id =
channel()->AttachMessagePipeEndpoint(mp, 1);
« no previous file with comments | « no previous file | mojo/system/core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698