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 "mojo/edk/system/channel.h" | 5 #include "mojo/system/channel.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/test/test_io_thread.h" | 10 #include "base/test/test_io_thread.h" |
11 #include "mojo/edk/embedder/platform_channel_pair.h" | 11 #include "mojo/embedder/platform_channel_pair.h" |
12 #include "mojo/edk/embedder/simple_platform_support.h" | 12 #include "mojo/embedder/simple_platform_support.h" |
13 #include "mojo/edk/system/channel_endpoint.h" | 13 #include "mojo/system/channel_endpoint.h" |
14 #include "mojo/edk/system/message_in_transit.h" | 14 #include "mojo/system/message_in_transit.h" |
15 #include "mojo/edk/system/message_pipe.h" | 15 #include "mojo/system/message_pipe.h" |
16 #include "mojo/edk/system/raw_channel.h" | 16 #include "mojo/system/raw_channel.h" |
17 #include "mojo/edk/system/test_utils.h" | 17 #include "mojo/system/test_utils.h" |
18 #include "mojo/edk/system/waiter.h" | 18 #include "mojo/system/waiter.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 | 20 |
21 namespace mojo { | 21 namespace mojo { |
22 namespace system { | 22 namespace system { |
23 namespace { | 23 namespace { |
24 | 24 |
25 enum Tristate { TRISTATE_UNKNOWN = -1, TRISTATE_FALSE = 0, TRISTATE_TRUE = 1 }; | 25 enum Tristate { TRISTATE_UNKNOWN = -1, TRISTATE_FALSE = 0, TRISTATE_TRUE = 1 }; |
26 | 26 |
27 Tristate BoolToTristate(bool b) { | 27 Tristate BoolToTristate(bool b) { |
28 return b ? TRISTATE_TRUE : TRISTATE_FALSE; | 28 return b ? TRISTATE_TRUE : TRISTATE_FALSE; |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 mp->Close(0); | 314 mp->Close(0); |
315 | 315 |
316 EXPECT_TRUE(channel()->HasOneRef()); | 316 EXPECT_TRUE(channel()->HasOneRef()); |
317 } | 317 } |
318 | 318 |
319 // TODO(vtl): More. ------------------------------------------------------------ | 319 // TODO(vtl): More. ------------------------------------------------------------ |
320 | 320 |
321 } // namespace | 321 } // namespace |
322 } // namespace system | 322 } // namespace system |
323 } // namespace mojo | 323 } // namespace mojo |
OLD | NEW |