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 <string.h> | 5 #include <string.h> |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "mojo/public/cpp/bindings/interface_request.h" | 11 #include "mojo/public/cpp/bindings/interface_request.h" |
12 #include "mojo/public/cpp/bindings/type_converter.h" | 12 #include "mojo/public/cpp/bindings/type_converter.h" |
13 #include "mojo/public/cpp/system/macros.h" | 13 #include "mojo/public/cpp/system/macros.h" |
14 #include "mojo/services/files/public/cpp/output_stream_file.h" | 14 #include "mojo/services/files/cpp/output_stream_file.h" |
15 #include "mojo/services/files/public/interfaces/file.mojom.h" | 15 #include "mojo/services/files/interfaces/file.mojom.h" |
16 #include "mojo/services/files/public/interfaces/types.mojom.h" | 16 #include "mojo/services/files/interfaces/types.mojom.h" |
17 #include "services/native_support/process_test_base.h" | 17 #include "services/native_support/process_test_base.h" |
18 | 18 |
19 namespace native_support { | 19 namespace native_support { |
20 namespace { | 20 namespace { |
21 | 21 |
22 using ProcessImplTest = ProcessTestBase; | 22 using ProcessImplTest = ProcessTestBase; |
23 | 23 |
24 // This also (slightly) tests |Wait()|, since we want to have some evidence that | 24 // This also (slightly) tests |Wait()|, since we want to have some evidence that |
25 // we ran the specified binary (/bin/true versus /bin/false). | 25 // we ran the specified binary (/bin/true versus /bin/false). |
26 TEST_F(ProcessImplTest, Spawn) { | 26 TEST_F(ProcessImplTest, Spawn) { |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 // thread doesn't have facilities for informing us that an FD will never be | 133 // thread doesn't have facilities for informing us that an FD will never be |
134 // readable. | 134 // readable. |
135 EXPECT_FALSE(file_impl.is_closed()); | 135 EXPECT_FALSE(file_impl.is_closed()); |
136 process_controller.reset(); | 136 process_controller.reset(); |
137 RunMessageLoop(); | 137 RunMessageLoop(); |
138 EXPECT_TRUE(file_impl.is_closed()); | 138 EXPECT_TRUE(file_impl.is_closed()); |
139 } | 139 } |
140 | 140 |
141 } // namespace | 141 } // namespace |
142 } // namespace native_support | 142 } // namespace native_support |
OLD | NEW |