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

Unified Diff: mojo/system/remote_message_pipe_unittest.cc

Issue 240133005: Mojo: Make some attempts towards fixing remote message pipe closure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« mojo/system/channel.cc ('K') | « mojo/system/proxy_message_pipe_endpoint.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_unittest.cc
diff --git a/mojo/system/remote_message_pipe_unittest.cc b/mojo/system/remote_message_pipe_unittest.cc
index 4dee5772ab8d018f52cc933ab5184584cf4b7a42..bffa30a413f3d3caebda5760c2fb729f871dab18 100644
--- a/mojo/system/remote_message_pipe_unittest.cc
+++ b/mojo/system/remote_message_pipe_unittest.cc
@@ -138,10 +138,14 @@ class RemoteMessagePipeTest : public testing::Test {
unsigned port = channel_index ^ 1u;
- // Important: If we don't boot
CreateAndInitChannel(channel_index);
- CHECK_EQ(channels_[channel_index]->AttachMessagePipeEndpoint(mp, port),
- Channel::kBootstrapEndpointId);
+ MessageInTransit::EndpointId endpoint_id =
+ channels_[channel_index]->AttachMessagePipeEndpoint(mp, port);
+ if (endpoint_id == MessageInTransit::kInvalidEndpointId) {
+ return;
+ }
darin (slow to review) 2014/04/16 21:33:43 nit: no brackets here for consistency in this file
viettrungluu 2014/04/16 22:25:01 Done.
+
+ CHECK_EQ(endpoint_id, Channel::kBootstrapEndpointId);
CHECK(channels_[channel_index]->RunMessagePipeEndpoint(
Channel::kBootstrapEndpointId, Channel::kBootstrapEndpointId));
}
@@ -561,7 +565,8 @@ TEST_F(RemoteMessagePipeTest, HandlePassing) {
TEST_F(RemoteMessagePipeTest, RacingClosesStress) {
base::TimeDelta delay = base::TimeDelta::FromMilliseconds(5);
- for (unsigned i = 0u; i < 256u; i++) {
+ for (unsigned i = 0; i < 256; i++) {
+ DVLOG(2) << "---------------------------------------- " << i;
scoped_refptr<MessagePipe> mp0(new MessagePipe(
scoped_ptr<MessagePipeEndpoint>(new LocalMessagePipeEndpoint()),
scoped_ptr<MessagePipeEndpoint>(new ProxyMessagePipeEndpoint())));
« mojo/system/channel.cc ('K') | « mojo/system/proxy_message_pipe_endpoint.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698