| 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 <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 namespace mojo { | 38 namespace mojo { |
| 39 namespace system { | 39 namespace system { |
| 40 namespace { | 40 namespace { |
| 41 | 41 |
| 42 const MojoHandleSignals kAllSignals = MOJO_HANDLE_SIGNAL_READABLE | | 42 const MojoHandleSignals kAllSignals = MOJO_HANDLE_SIGNAL_READABLE | |
| 43 MOJO_HANDLE_SIGNAL_WRITABLE | | 43 MOJO_HANDLE_SIGNAL_WRITABLE | |
| 44 MOJO_HANDLE_SIGNAL_PEER_CLOSED; | 44 MOJO_HANDLE_SIGNAL_PEER_CLOSED; |
| 45 | 45 |
| 46 class RemoteMessagePipeTest : public testing::Test { | 46 class RemoteMessagePipeTest : public testing::Test { |
| 47 public: | 47 public: |
| 48 RemoteMessagePipeTest() : io_thread_(mojo::test::TestIOThread::kAutoStart) {} | 48 RemoteMessagePipeTest() |
| 49 : io_thread_(mojo::test::TestIOThread::StartMode::AUTO) {} |
| 49 ~RemoteMessagePipeTest() override {} | 50 ~RemoteMessagePipeTest() override {} |
| 50 | 51 |
| 51 void SetUp() override { | 52 void SetUp() override { |
| 52 io_thread_.PostTaskAndWait( | 53 io_thread_.PostTaskAndWait( |
| 53 FROM_HERE, base::Bind(&RemoteMessagePipeTest::SetUpOnIOThread, | 54 FROM_HERE, base::Bind(&RemoteMessagePipeTest::SetUpOnIOThread, |
| 54 base::Unretained(this))); | 55 base::Unretained(this))); |
| 55 } | 56 } |
| 56 | 57 |
| 57 void TearDown() override { | 58 void TearDown() override { |
| 58 io_thread_.PostTaskAndWait( | 59 io_thread_.PostTaskAndWait( |
| (...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1352 mp0->Close(0); | 1353 mp0->Close(0); |
| 1353 mp1->Close(1); | 1354 mp1->Close(1); |
| 1354 EXPECT_EQ(MOJO_RESULT_OK, dispatcher->Close()); | 1355 EXPECT_EQ(MOJO_RESULT_OK, dispatcher->Close()); |
| 1355 // Note that |local_mp|'s port 0 belong to |dispatcher|, which was closed. | 1356 // Note that |local_mp|'s port 0 belong to |dispatcher|, which was closed. |
| 1356 local_mp->Close(1); | 1357 local_mp->Close(1); |
| 1357 } | 1358 } |
| 1358 | 1359 |
| 1359 } // namespace | 1360 } // namespace |
| 1360 } // namespace system | 1361 } // namespace system |
| 1361 } // namespace mojo | 1362 } // namespace mojo |
| OLD | NEW |