Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(830)

Side by Side Diff: chrome/common/component_flash_hint_file_linux_unittest.cc

Issue 2733323002: Changing multiprocess test SpawnChild to return a struct. (Closed)
Patch Set: Synced Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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_child = SpawnChild("NoExecMountTest");
161 ASSERT_TRUE(process.IsValid()); 161 ASSERT_TRUE(spawn_child.process.IsValid());
162 int exit_code = 42; 162 int exit_code = 42;
163 ASSERT_TRUE(process.WaitForExitWithTimeout(TestTimeouts::action_max_timeout(), 163 ASSERT_TRUE(spawn_child.process.WaitForExitWithTimeout(
164 &exit_code)); 164 TestTimeouts::action_max_timeout(), &exit_code));
165 EXPECT_EQ(0, exit_code); 165 EXPECT_EQ(0, exit_code);
166 } 166 }
167 167
168 } // namespace chrome 168 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/process_singleton_win_unittest.cc ('k') | chrome/common/multi_process_lock_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698