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 <errno.h> | 5 #include <errno.h> |
6 #include <fcntl.h> | 6 #include <fcntl.h> |
7 #include <sys/stat.h> | 7 #include <sys/stat.h> |
8 #include <sys/types.h> | 8 #include <sys/types.h> |
9 #include <sys/wait.h> | 9 #include <sys/wait.h> |
10 #include <unistd.h> | 10 #include <unistd.h> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/bind.h" | 13 #include "base/bind.h" |
14 #include "base/callback.h" | 14 #include "base/callback.h" |
15 #include "base/file_util.h" | 15 #include "base/files/file_util.h" |
16 #include "base/files/scoped_file.h" | 16 #include "base/files/scoped_file.h" |
17 #include "base/logging.h" | 17 #include "base/logging.h" |
18 #include "base/posix/eintr_wrapper.h" | 18 #include "base/posix/eintr_wrapper.h" |
19 #include "base/threading/platform_thread.h" | 19 #include "base/threading/platform_thread.h" |
20 #include "base/time/time.h" | 20 #include "base/time/time.h" |
21 #include "sandbox/linux/services/scoped_process.h" | 21 #include "sandbox/linux/services/scoped_process.h" |
22 #include "sandbox/linux/tests/unit_tests.h" | 22 #include "sandbox/linux/tests/unit_tests.h" |
23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
24 | 24 |
25 namespace sandbox { | 25 namespace sandbox { |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 // Verify that the closure did, indeed, run. | 121 // Verify that the closure did, indeed, run. |
122 ASSERT_EQ(0, fcntl(pipe_fds[0], F_SETFL, O_NONBLOCK)); | 122 ASSERT_EQ(0, fcntl(pipe_fds[0], F_SETFL, O_NONBLOCK)); |
123 char c = 0; | 123 char c = 0; |
124 EXPECT_EQ(1, read(pipe_fds[0], &c, 1)); | 124 EXPECT_EQ(1, read(pipe_fds[0], &c, 1)); |
125 EXPECT_EQ('1', c); | 125 EXPECT_EQ('1', c); |
126 } | 126 } |
127 | 127 |
128 } // namespace | 128 } // namespace |
129 | 129 |
130 } // namespace sandbox | 130 } // namespace sandbox |
OLD | NEW |