| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdint.h> | 5 #include <stdint.h> |
| 6 #include <stdio.h> | 6 #include <stdio.h> |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 namespace mojo { | 39 namespace mojo { |
| 40 namespace system { | 40 namespace system { |
| 41 namespace { | 41 namespace { |
| 42 | 42 |
| 43 class RemoteMessagePipeTest : public testing::Test { | 43 class RemoteMessagePipeTest : public testing::Test { |
| 44 public: | 44 public: |
| 45 RemoteMessagePipeTest() : io_thread_(base::TestIOThread::kAutoStart) {} | 45 RemoteMessagePipeTest() : io_thread_(base::TestIOThread::kAutoStart) {} |
| 46 virtual ~RemoteMessagePipeTest() {} | 46 virtual ~RemoteMessagePipeTest() {} |
| 47 | 47 |
| 48 virtual void SetUp() OVERRIDE { | 48 virtual void SetUp() override { |
| 49 io_thread_.PostTaskAndWait( | 49 io_thread_.PostTaskAndWait( |
| 50 FROM_HERE, | 50 FROM_HERE, |
| 51 base::Bind(&RemoteMessagePipeTest::SetUpOnIOThread, | 51 base::Bind(&RemoteMessagePipeTest::SetUpOnIOThread, |
| 52 base::Unretained(this))); | 52 base::Unretained(this))); |
| 53 } | 53 } |
| 54 | 54 |
| 55 virtual void TearDown() OVERRIDE { | 55 virtual void TearDown() override { |
| 56 io_thread_.PostTaskAndWait( | 56 io_thread_.PostTaskAndWait( |
| 57 FROM_HERE, | 57 FROM_HERE, |
| 58 base::Bind(&RemoteMessagePipeTest::TearDownOnIOThread, | 58 base::Bind(&RemoteMessagePipeTest::TearDownOnIOThread, |
| 59 base::Unretained(this))); | 59 base::Unretained(this))); |
| 60 } | 60 } |
| 61 | 61 |
| 62 protected: | 62 protected: |
| 63 // This connects the two given |ChannelEndpoint|s. | 63 // This connects the two given |ChannelEndpoint|s. |
| 64 void ConnectChannelEndpoints(scoped_refptr<ChannelEndpoint> ep0, | 64 void ConnectChannelEndpoints(scoped_refptr<ChannelEndpoint> ep0, |
| 65 scoped_refptr<ChannelEndpoint> ep1) { | 65 scoped_refptr<ChannelEndpoint> ep1) { |
| (...skipping 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1183 mp0->Close(0); | 1183 mp0->Close(0); |
| 1184 mp1->Close(1); | 1184 mp1->Close(1); |
| 1185 EXPECT_EQ(MOJO_RESULT_OK, dispatcher->Close()); | 1185 EXPECT_EQ(MOJO_RESULT_OK, dispatcher->Close()); |
| 1186 // Note that |local_mp|'s port 0 belong to |dispatcher|, which was closed. | 1186 // Note that |local_mp|'s port 0 belong to |dispatcher|, which was closed. |
| 1187 local_mp->Close(1); | 1187 local_mp->Close(1); |
| 1188 } | 1188 } |
| 1189 | 1189 |
| 1190 } // namespace | 1190 } // namespace |
| 1191 } // namespace system | 1191 } // namespace system |
| 1192 } // namespace mojo | 1192 } // namespace mojo |
| OLD | NEW |