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 "chrome/common/component_flash_hint_file_linux.h" | 5 #include "chrome/common/component_flash_hint_file_linux.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <stdlib.h> | 9 #include <stdlib.h> |
10 #include <sys/mount.h> | 10 #include <sys/mount.h> |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 150 |
151 if (umount(temp_dir.GetPath().value().c_str()) != 0) | 151 if (umount(temp_dir.GetPath().value().c_str()) != 0) |
152 LOG(ERROR) << "Could not unmount directory " << temp_dir.GetPath().value(); | 152 LOG(ERROR) << "Could not unmount directory " << temp_dir.GetPath().value(); |
153 | 153 |
154 CHECK(file_written); | 154 CHECK(file_written); |
155 CHECK(!test_exec); | 155 CHECK(!test_exec); |
156 return 0; | 156 return 0; |
157 } | 157 } |
158 | 158 |
159 TEST_F(ComponentFlashHintFileTest, ExecTest2) { | 159 TEST_F(ComponentFlashHintFileTest, ExecTest2) { |
160 base::Process process = SpawnChild("NoExecMountTest"); | 160 base::SpawnChildResult spawn_result = SpawnChild("NoExecMountTest"); |
| 161 base::Process process(std::move(spawn_result.process)); |
161 ASSERT_TRUE(process.IsValid()); | 162 ASSERT_TRUE(process.IsValid()); |
162 int exit_code = 42; | 163 int exit_code = 42; |
163 ASSERT_TRUE(process.WaitForExitWithTimeout(TestTimeouts::action_max_timeout(), | 164 ASSERT_TRUE(process.WaitForExitWithTimeout(TestTimeouts::action_max_timeout(), |
164 &exit_code)); | 165 &exit_code)); |
165 EXPECT_EQ(0, exit_code); | 166 EXPECT_EQ(0, exit_code); |
166 } | 167 } |
167 | 168 |
168 } // namespace chrome | 169 } // namespace chrome |
OLD | NEW |