| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "mojo/edk/system/channel_endpoint.h" | 5 #include "mojo/edk/system/channel_endpoint.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "mojo/edk/system/channel_test_base.h" | 10 #include "mojo/edk/system/channel_test_base.h" |
| 11 #include "mojo/edk/system/message_in_transit_queue.h" | 11 #include "mojo/edk/system/message_in_transit_queue.h" |
| 12 #include "mojo/edk/system/message_in_transit_test_utils.h" | 12 #include "mojo/edk/system/message_in_transit_test_utils.h" |
| 13 #include "mojo/edk/system/ref_ptr.h" | |
| 14 #include "mojo/edk/system/test/timeouts.h" | 13 #include "mojo/edk/system/test/timeouts.h" |
| 15 #include "mojo/edk/system/test_channel_endpoint_client.h" | 14 #include "mojo/edk/system/test_channel_endpoint_client.h" |
| 16 #include "mojo/edk/system/waitable_event.h" | 15 #include "mojo/edk/system/waitable_event.h" |
| 16 #include "mojo/edk/util/ref_ptr.h" |
| 17 #include "mojo/public/cpp/system/macros.h" | 17 #include "mojo/public/cpp/system/macros.h" |
| 18 | 18 |
| 19 using mojo::util::MakeRefCounted; |
| 20 |
| 19 namespace mojo { | 21 namespace mojo { |
| 20 namespace system { | 22 namespace system { |
| 21 namespace { | 23 namespace { |
| 22 | 24 |
| 23 class ChannelEndpointTest : public test::ChannelTestBase { | 25 class ChannelEndpointTest : public test::ChannelTestBase { |
| 24 public: | 26 public: |
| 25 ChannelEndpointTest() {} | 27 ChannelEndpointTest() {} |
| 26 ~ChannelEndpointTest() override {} | 28 ~ChannelEndpointTest() override {} |
| 27 | 29 |
| 28 void SetUp() override { | 30 void SetUp() override { |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 for (unsigned message_id = 1; message_id <= 6; message_id++) { | 128 for (unsigned message_id = 1; message_id <= 6; message_id++) { |
| 127 std::unique_ptr<MessageInTransit> read_message = client0->PopMessage(); | 129 std::unique_ptr<MessageInTransit> read_message = client0->PopMessage(); |
| 128 ASSERT_TRUE(read_message); | 130 ASSERT_TRUE(read_message); |
| 129 test::VerifyTestMessage(read_message.get(), message_id); | 131 test::VerifyTestMessage(read_message.get(), message_id); |
| 130 } | 132 } |
| 131 } | 133 } |
| 132 | 134 |
| 133 } // namespace | 135 } // namespace |
| 134 } // namespace system | 136 } // namespace system |
| 135 } // namespace mojo | 137 } // namespace mojo |
| OLD | NEW |