OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/common/test/multiprocess_test_base.h" | 5 #include "mojo/common/test/multiprocess_test_base.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "mojo/system/scoped_platform_handle.h" | 9 #include "mojo/system/scoped_platform_handle.h" |
10 | 10 |
11 #if defined(OS_POSIX) | 11 #if defined(OS_POSIX) |
12 #include <fcntl.h> | 12 #include <fcntl.h> |
13 #include <unistd.h> | 13 #include <unistd.h> |
14 | 14 |
15 #include "base/posix/eintr_wrapper.h" | 15 #include "base/posix/eintr_wrapper.h" |
16 #endif | 16 #endif |
17 | 17 |
18 namespace mojo { | 18 namespace mojo { |
19 namespace { | 19 namespace { |
20 | 20 |
21 class MultiprocessTestBaseTest : public test::MultiprocessTestBase { | 21 typedef test::MultiprocessTestBase MultiprocessTestBaseTest; |
22 }; | |
23 | 22 |
24 TEST_F(MultiprocessTestBaseTest, RunChild) { | 23 TEST_F(MultiprocessTestBaseTest, RunChild) { |
25 // TODO(vtl): Not implemented on Windows yet. | 24 // TODO(vtl): Not implemented on Windows yet. |
26 #if defined(OS_POSIX) | 25 #if defined(OS_POSIX) |
27 EXPECT_TRUE(server_platform_handle.is_valid()); | 26 EXPECT_TRUE(server_platform_handle.is_valid()); |
28 #endif | 27 #endif |
29 StartChild("RunChild"); | 28 StartChild("RunChild"); |
30 EXPECT_EQ(123, WaitForChildShutdown()); | 29 EXPECT_EQ(123, WaitForChildShutdown()); |
31 } | 30 } |
32 | 31 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 CHECK_EQ(write_size, 1); | 98 CHECK_EQ(write_size, 1); |
100 | 99 |
101 // And return it, incremented again. | 100 // And return it, incremented again. |
102 c++; | 101 c++; |
103 return static_cast<int>(c); | 102 return static_cast<int>(c); |
104 } | 103 } |
105 #endif // defined(OS_POSIX) | 104 #endif // defined(OS_POSIX) |
106 | 105 |
107 } // namespace | 106 } // namespace |
108 } // namespace mojo | 107 } // namespace mojo |
OLD | NEW |