OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "webkit/fileapi/file_system_usage_cache.h" | 5 #include "webkit/fileapi/file_system_usage_cache.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/memory/scoped_temp_dir.h" | 9 #include "base/scoped_temp_dir.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 namespace fileapi { | 12 namespace fileapi { |
13 | 13 |
14 class FileSystemUsageCacheTest : public testing::Test { | 14 class FileSystemUsageCacheTest : public testing::Test { |
15 public: | 15 public: |
16 FileSystemUsageCacheTest() {} | 16 FileSystemUsageCacheTest() {} |
17 | 17 |
18 void SetUp() { | 18 void SetUp() { |
19 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); | 19 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 FilePath usage_file_path = GetUsageFilePath(); | 127 FilePath usage_file_path = GetUsageFilePath(); |
128 EXPECT_FALSE(FileSystemUsageCache::IncrementDirty(usage_file_path)); | 128 EXPECT_FALSE(FileSystemUsageCache::IncrementDirty(usage_file_path)); |
129 } | 129 } |
130 | 130 |
131 TEST_F(FileSystemUsageCacheTest, DecrementDirtyWithoutCacheFileTest) { | 131 TEST_F(FileSystemUsageCacheTest, DecrementDirtyWithoutCacheFileTest) { |
132 FilePath usage_file_path = GetUsageFilePath(); | 132 FilePath usage_file_path = GetUsageFilePath(); |
133 EXPECT_FALSE(FileSystemUsageCache::IncrementDirty(usage_file_path)); | 133 EXPECT_FALSE(FileSystemUsageCache::IncrementDirty(usage_file_path)); |
134 } | 134 } |
135 | 135 |
136 } // namespace fileapi | 136 } // namespace fileapi |
OLD | NEW |