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

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: fix some locking issues 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
« no previous file with comments | « 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..7deb252ef4c9772702e2648af35911418b58f856 100644
--- a/mojo/system/remote_message_pipe_unittest.cc
+++ b/mojo/system/remote_message_pipe_unittest.cc
@@ -138,10 +138,13 @@ 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;
+
+ CHECK_EQ(endpoint_id, Channel::kBootstrapEndpointId);
CHECK(channels_[channel_index]->RunMessagePipeEndpoint(
Channel::kBootstrapEndpointId, Channel::kBootstrapEndpointId));
}
@@ -561,7 +564,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())));
« no previous file with comments | « 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