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/raw_channel.h" | 5 #include "mojo/edk/system/raw_channel.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <stdio.h> | 8 #include <stdio.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "base/test/test_io_thread.h" | 24 #include "base/test/test_io_thread.h" |
25 #include "base/threading/simple_thread.h" | 25 #include "base/threading/simple_thread.h" |
26 #include "build/build_config.h" // TODO(vtl): Remove this. | 26 #include "build/build_config.h" // TODO(vtl): Remove this. |
27 #include "mojo/edk/embedder/platform_channel_pair.h" | 27 #include "mojo/edk/embedder/platform_channel_pair.h" |
28 #include "mojo/edk/embedder/platform_handle.h" | 28 #include "mojo/edk/embedder/platform_handle.h" |
29 #include "mojo/edk/embedder/scoped_platform_handle.h" | 29 #include "mojo/edk/embedder/scoped_platform_handle.h" |
30 #include "mojo/edk/system/message_in_transit.h" | 30 #include "mojo/edk/system/message_in_transit.h" |
31 #include "mojo/edk/system/test_utils.h" | 31 #include "mojo/edk/system/test_utils.h" |
32 #include "mojo/edk/system/transport_data.h" | 32 #include "mojo/edk/system/transport_data.h" |
33 #include "mojo/edk/test/test_utils.h" | 33 #include "mojo/edk/test/test_utils.h" |
| 34 #include "mojo/public/cpp/system/macros.h" |
34 #include "testing/gtest/include/gtest/gtest.h" | 35 #include "testing/gtest/include/gtest/gtest.h" |
35 #include "third_party/mojo/src/mojo/public/cpp/system/macros.h" | |
36 | 36 |
37 namespace mojo { | 37 namespace mojo { |
38 namespace edk { | 38 namespace edk { |
39 namespace { | 39 namespace { |
40 | 40 |
41 scoped_ptr<MessageInTransit> MakeTestMessage(uint32_t num_bytes) { | 41 scoped_ptr<MessageInTransit> MakeTestMessage(uint32_t num_bytes) { |
42 std::vector<unsigned char> bytes(num_bytes, 0); | 42 std::vector<unsigned char> bytes(num_bytes, 0); |
43 for (size_t i = 0; i < num_bytes; i++) | 43 for (size_t i = 0; i < num_bytes; i++) |
44 bytes[i] = static_cast<unsigned char>(i + num_bytes); | 44 bytes[i] = static_cast<unsigned char>(i + num_bytes); |
45 return make_scoped_ptr( | 45 return make_scoped_ptr( |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 FROM_HERE, | 637 FROM_HERE, |
638 base::Bind(&RawChannel::Shutdown, base::Unretained(rc_read))); | 638 base::Bind(&RawChannel::Shutdown, base::Unretained(rc_read))); |
639 test_io_thread()->PostTaskAndWait( | 639 test_io_thread()->PostTaskAndWait( |
640 FROM_HERE, | 640 FROM_HERE, |
641 base::Bind(&RawChannel::Shutdown, base::Unretained(rc_write))); | 641 base::Bind(&RawChannel::Shutdown, base::Unretained(rc_write))); |
642 } | 642 } |
643 | 643 |
644 } // namespace | 644 } // namespace |
645 } // namespace edk | 645 } // namespace edk |
646 } // namespace mojo | 646 } // namespace mojo |
OLD | NEW |