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

Side by Side Diff: base/memory/shared_memory_unittest.cc

Issue 191483002: Get rid of multiprocess_test's debug_on_start arguments. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: restore ipc_switches.* Created 6 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 | Annotate | Revision Log
« no previous file with comments | « base/debug/stack_trace_unittest.cc ('k') | base/metrics/stats_table_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/memory/shared_memory.h" 7 #include "base/memory/shared_memory.h"
8 #include "base/process/kill.h" 8 #include "base/process/kill.h"
9 #include "base/rand_util.h" 9 #include "base/rand_util.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 static const char* const s_test_name_; 641 static const char* const s_test_name_;
642 }; 642 };
643 643
644 const char* const SharedMemoryProcessTest::s_test_name_ = "MPMem"; 644 const char* const SharedMemoryProcessTest::s_test_name_ = "MPMem";
645 645
646 TEST_F(SharedMemoryProcessTest, Tasks) { 646 TEST_F(SharedMemoryProcessTest, Tasks) {
647 SharedMemoryProcessTest::CleanUp(); 647 SharedMemoryProcessTest::CleanUp();
648 648
649 ProcessHandle handles[kNumTasks]; 649 ProcessHandle handles[kNumTasks];
650 for (int index = 0; index < kNumTasks; ++index) { 650 for (int index = 0; index < kNumTasks; ++index) {
651 handles[index] = SpawnChild("SharedMemoryTestMain", false); 651 handles[index] = SpawnChild("SharedMemoryTestMain");
652 ASSERT_TRUE(handles[index]); 652 ASSERT_TRUE(handles[index]);
653 } 653 }
654 654
655 int exit_code = 0; 655 int exit_code = 0;
656 for (int index = 0; index < kNumTasks; ++index) { 656 for (int index = 0; index < kNumTasks; ++index) {
657 EXPECT_TRUE(WaitForExitCode(handles[index], &exit_code)); 657 EXPECT_TRUE(WaitForExitCode(handles[index], &exit_code));
658 EXPECT_EQ(0, exit_code); 658 EXPECT_EQ(0, exit_code);
659 } 659 }
660 660
661 SharedMemoryProcessTest::CleanUp(); 661 SharedMemoryProcessTest::CleanUp();
662 } 662 }
663 663
664 MULTIPROCESS_TEST_MAIN(SharedMemoryTestMain) { 664 MULTIPROCESS_TEST_MAIN(SharedMemoryTestMain) {
665 return SharedMemoryProcessTest::TaskTestMain(); 665 return SharedMemoryProcessTest::TaskTestMain();
666 } 666 }
667 667
668 #endif // !OS_IOS 668 #endif // !OS_IOS
669 669
670 } // namespace base 670 } // namespace base
OLDNEW
« no previous file with comments | « base/debug/stack_trace_unittest.cc ('k') | base/metrics/stats_table_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698