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

Side by Side Diff: sandbox/mac/sandbox_mac_compiler_v2_unittest.mm

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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #import <Foundation/Foundation.h> 5 #import <Foundation/Foundation.h>
6 #import <IOSurface/IOSurface.h> 6 #import <IOSurface/IOSurface.h>
7 7
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <sys/mman.h> 10 #include <sys/mman.h>
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 char oldp[oldp_len]; 119 char oldp[oldp_len];
120 EXPECT_EQ(0, sysctlbyname("hw.activecpu", oldp, &oldp_len, NULL, 0)); 120 EXPECT_EQ(0, sysctlbyname("hw.activecpu", oldp, &oldp_len, NULL, 0));
121 121
122 size_t ncpu_len; 122 size_t ncpu_len;
123 EXPECT_NE(0, sysctlbyname("hw.ncpu", NULL, &ncpu_len, NULL, 0)); 123 EXPECT_NE(0, sysctlbyname("hw.ncpu", NULL, &ncpu_len, NULL, 0));
124 124
125 return 0; 125 return 0;
126 } 126 }
127 127
128 TEST_F(SandboxMacCompilerV2Test, V2ProfileTest) { 128 TEST_F(SandboxMacCompilerV2Test, V2ProfileTest) {
129 base::Process process = SpawnChild("V2ProfileProcess"); 129 base::SpawnChildResult spawn_child = SpawnChild("V2ProfileProcess");
130 ASSERT_TRUE(process.IsValid()); 130 ASSERT_TRUE(spawn_child.process.IsValid());
131 int exit_code = 42; 131 int exit_code = 42;
132 EXPECT_TRUE(process.WaitForExitWithTimeout(TestTimeouts::action_max_timeout(), 132 EXPECT_TRUE(spawn_child.process.WaitForExitWithTimeout(
133 &exit_code)); 133 TestTimeouts::action_max_timeout(), &exit_code));
134 EXPECT_EQ(exit_code, 0); 134 EXPECT_EQ(exit_code, 0);
135 } 135 }
136 136
137 } // namespace sandbox 137 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/mac/sandbox_mac_compiler_unittest.mm ('k') | sandbox/mac/xpc_message_server_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698