Index: net/disk_cache/storage_block_unittest.cc |
diff --git a/net/disk_cache/storage_block_unittest.cc b/net/disk_cache/storage_block_unittest.cc |
index c9406b6984b46f7873aa09afc39684340f304265..abaa4a7aabbaa5d80f8a0ef0354556c7b3a9d3a5 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)); |