OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #if defined(OS_MACOSX) | 6 #if defined(OS_MACOSX) |
7 #include "base/mac/scoped_nsautorelease_pool.h" | 7 #include "base/mac/scoped_nsautorelease_pool.h" |
8 #endif | 8 #endif |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/shared_memory.h" | 10 #include "base/shared_memory.h" |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 | 416 |
417 ProcessHandle handles[kNumTasks]; | 417 ProcessHandle handles[kNumTasks]; |
418 for (int index = 0; index < kNumTasks; ++index) { | 418 for (int index = 0; index < kNumTasks; ++index) { |
419 handles[index] = SpawnChild("SharedMemoryTestMain", false); | 419 handles[index] = SpawnChild("SharedMemoryTestMain", false); |
420 ASSERT_TRUE(handles[index]); | 420 ASSERT_TRUE(handles[index]); |
421 } | 421 } |
422 | 422 |
423 int exit_code = 0; | 423 int exit_code = 0; |
424 for (int index = 0; index < kNumTasks; ++index) { | 424 for (int index = 0; index < kNumTasks; ++index) { |
425 EXPECT_TRUE(WaitForExitCode(handles[index], &exit_code)); | 425 EXPECT_TRUE(WaitForExitCode(handles[index], &exit_code)); |
426 EXPECT_TRUE(exit_code == 0); | 426 EXPECT_EQ(0, exit_code); |
427 } | 427 } |
428 | 428 |
429 SharedMemoryProcessTest::CleanUp(); | 429 SharedMemoryProcessTest::CleanUp(); |
430 } | 430 } |
431 | 431 |
432 MULTIPROCESS_TEST_MAIN(SharedMemoryTestMain) { | 432 MULTIPROCESS_TEST_MAIN(SharedMemoryTestMain) { |
433 return SharedMemoryProcessTest::TaskTestMain(); | 433 return SharedMemoryProcessTest::TaskTestMain(); |
434 } | 434 } |
435 | 435 |
436 } // namespace base | 436 } // namespace base |
OLD | NEW |