diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-22 11:32:53 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-22 11:32:53 +0000 |
commit | c86d350e584b00bd5df71e82b5774ef245a14bef (patch) | |
tree | fd28cd57045ae2862e37621e24453612443d8029 /net/disk_cache/storage_block_unittest.cc | |
parent | 0407998a8dbe022e1ae9677935a0bc822bcd61ed (diff) | |
download | chromium_src-c86d350e584b00bd5df71e82b5774ef245a14bef.zip chromium_src-c86d350e584b00bd5df71e82b5774ef245a14bef.tar.gz chromium_src-c86d350e584b00bd5df71e82b5774ef245a14bef.tar.bz2 |
GTTF: Make net_unittests run successfully with parallel test launcher
by using a unique directory for disk cache tests.
BUG=54098
TEST=run net_unittests using tools/parallel_launcher/parallel_launcher.py
Review URL: http://codereview.chromium.org/3410008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60165 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/storage_block_unittest.cc')
-rw-r--r-- | net/disk_cache/storage_block_unittest.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/net/disk_cache/storage_block_unittest.cc b/net/disk_cache/storage_block_unittest.cc index c9406b6..abaa4a7 100644 --- a/net/disk_cache/storage_block_unittest.cc +++ b/net/disk_cache/storage_block_unittest.cc @@ -10,7 +10,9 @@ #include "testing/gtest/include/gtest/gtest.h" TEST_F(DiskCacheTest, StorageBlock_LoadStore) { - FilePath filename = GetCacheFilePath().AppendASCII("a_test"); + ScopedTestCache test_cache; + FilePath filename = test_cache.path().AppendASCII("a_test"); + scoped_refptr<disk_cache::MappedFile> file(new disk_cache::MappedFile); ASSERT_TRUE(CreateCacheTestFile(filename)); ASSERT_TRUE(file->Init(filename, 8192)); @@ -30,7 +32,9 @@ TEST_F(DiskCacheTest, StorageBlock_LoadStore) { } TEST_F(DiskCacheTest, StorageBlock_SetData) { - FilePath filename = GetCacheFilePath().AppendASCII("a_test"); + ScopedTestCache test_cache; + FilePath filename = test_cache.path().AppendASCII("a_test"); + scoped_refptr<disk_cache::MappedFile> file(new disk_cache::MappedFile); ASSERT_TRUE(CreateCacheTestFile(filename)); ASSERT_TRUE(file->Init(filename, 8192)); @@ -50,7 +54,9 @@ TEST_F(DiskCacheTest, StorageBlock_SetData) { } TEST_F(DiskCacheTest, StorageBlock_SetModified) { - FilePath filename = GetCacheFilePath().AppendASCII("a_test"); + ScopedTestCache test_cache; + FilePath filename = test_cache.path().AppendASCII("a_test"); + scoped_refptr<disk_cache::MappedFile> file(new disk_cache::MappedFile); ASSERT_TRUE(CreateCacheTestFile(filename)); ASSERT_TRUE(file->Init(filename, 8192)); |