diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-09 15:25:53 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-09 15:25:53 +0000 |
commit | 19d536f25ffa4e876c7af79b201c7330841b31ea (patch) | |
tree | 2f64619a8812920692bd3c7e69103727021e9d53 /base/shared_memory_unittest.cc | |
parent | 6c4e6631acb0893ba00f035792e80942e2b00bd3 (diff) | |
download | chromium_src-19d536f25ffa4e876c7af79b201c7330841b31ea.zip chromium_src-19d536f25ffa4e876c7af79b201c7330841b31ea.tar.gz chromium_src-19d536f25ffa4e876c7af79b201c7330841b31ea.tar.bz2 |
Cleanup in base. This moves the implementation (and a bunch of header file
dependencies) from the multiprocess test and the test_suite headers to .cc
files. Moves multiprocess_test to the test directory, and all of this stuff to
the existing base_test_support project. I also used the base namespace.
Previously other projects included this functionality just by #include because
it was all inline, so I had to add dependencies on base_test_support in a few
places.
Moves and renames the command line switch this was using to base_switches. Move
the base switch for process type to chrome switches.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/3026055
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55400 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/shared_memory_unittest.cc')
-rw-r--r-- | base/shared_memory_unittest.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/base/shared_memory_unittest.cc b/base/shared_memory_unittest.cc index 88b5fa0..4e83311 100644 --- a/base/shared_memory_unittest.cc +++ b/base/shared_memory_unittest.cc @@ -3,12 +3,13 @@ // found in the LICENSE file. #include "base/basictypes.h" -#include "base/multiprocess_test.h" #include "base/platform_thread.h" #include "base/scoped_nsautorelease_pool.h" #include "base/shared_memory.h" #include "base/scoped_ptr.h" +#include "base/test/multiprocess_test.h" #include "testing/gtest/include/gtest/gtest.h" +#include "testing/multiprocess_func_list.h" static const int kNumThreads = 5; static const int kNumTasks = 5; @@ -271,13 +272,11 @@ TEST(SharedMemoryTest, AnonymousPrivate) { for (int i = 0; i < count; i++) { memories[i].Close(); } - } - // On POSIX it is especially important we test shmem across processes, // not just across threads. But the test is enabled on all platforms. -class SharedMemoryProcessTest : public MultiProcessTest { +class SharedMemoryProcessTest : public base::MultiProcessTest { public: static void CleanUp() { @@ -326,7 +325,7 @@ TEST_F(SharedMemoryProcessTest, Tasks) { base::ProcessHandle handles[kNumTasks]; for (int index = 0; index < kNumTasks; ++index) { - handles[index] = SpawnChild("SharedMemoryTestMain"); + handles[index] = SpawnChild("SharedMemoryTestMain", false); } int exit_code = 0; @@ -342,5 +341,4 @@ MULTIPROCESS_TEST_MAIN(SharedMemoryTestMain) { return SharedMemoryProcessTest::TaskTestMain(); } - } // namespace base |