summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-02 20:07:23 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-02 20:07:23 +0000
commitdfa8031c1c7351938e3db8e02885ab0cd2d2e60a (patch)
treee77c2c45fb04489ce5476227c0741b7aad4078a2 /webkit/fileapi
parentb3f7d32b6528237ee3687eed8a4aa3e89c4f5348 (diff)
downloadchromium_src-dfa8031c1c7351938e3db8e02885ab0cd2d2e60a.zip
chromium_src-dfa8031c1c7351938e3db8e02885ab0cd2d2e60a.tar.gz
chromium_src-dfa8031c1c7351938e3db8e02885ab0cd2d2e60a.tar.bz2
Revert 76586 - Fix clang build.
BUG=none TEST=none TBR=jcivelli,dmikurube TBR=thakis@chromium.org Review URL: http://codereview.chromium.org/6597116 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76592 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi')
-rw-r--r--webkit/fileapi/file_system_usage_cache_unittest.cc34
1 files changed, 22 insertions, 12 deletions
diff --git a/webkit/fileapi/file_system_usage_cache_unittest.cc b/webkit/fileapi/file_system_usage_cache_unittest.cc
index bf9ec78..f74bdbb 100644
--- a/webkit/fileapi/file_system_usage_cache_unittest.cc
+++ b/webkit/fileapi/file_system_usage_cache_unittest.cc
@@ -56,7 +56,8 @@ TEST_F(FileSystemUsageCacheTest, IncAndGetSizeTest) {
FilePath usage_file_path = GetUsageFilePath();
ASSERT_EQ(FileSystemUsageCache::kUsageFileSize,
FileSystemUsageCache::UpdateUsage(usage_file_path, 98214));
- ASSERT_TRUE(FileSystemUsageCache::IncrementDirty(usage_file_path));
+ ASSERT_EQ(true,
+ FileSystemUsageCache::IncrementDirty(usage_file_path));
EXPECT_EQ(-1, FileSystemUsageCache::GetUsage(usage_file_path));
}
@@ -66,7 +67,8 @@ TEST_F(FileSystemUsageCacheTest, DecAndGetSizeTest) {
ASSERT_EQ(FileSystemUsageCache::kUsageFileSize,
FileSystemUsageCache::UpdateUsage(usage_file_path, size));
// DecrementDirty for dirty = 0 is invalid. It returns false.
- ASSERT_FALSE(FileSystemUsageCache::DecrementDirty(usage_file_path));
+ ASSERT_EQ(false,
+ FileSystemUsageCache::DecrementDirty(usage_file_path));
EXPECT_EQ(size, FileSystemUsageCache::GetUsage(usage_file_path));
}
@@ -75,8 +77,10 @@ TEST_F(FileSystemUsageCacheTest, IncDecAndGetSizeTest) {
FilePath usage_file_path = GetUsageFilePath();
ASSERT_EQ(FileSystemUsageCache::kUsageFileSize,
FileSystemUsageCache::UpdateUsage(usage_file_path, size));
- ASSERT_TRUE(FileSystemUsageCache::IncrementDirty(usage_file_path));
- ASSERT_TRUE(FileSystemUsageCache::DecrementDirty(usage_file_path));
+ ASSERT_EQ(true,
+ FileSystemUsageCache::IncrementDirty(usage_file_path));
+ ASSERT_EQ(true,
+ FileSystemUsageCache::DecrementDirty(usage_file_path));
EXPECT_EQ(size, FileSystemUsageCache::GetUsage(usage_file_path));
}
@@ -85,8 +89,10 @@ TEST_F(FileSystemUsageCacheTest, DecIncAndGetSizeTest) {
ASSERT_EQ(FileSystemUsageCache::kUsageFileSize,
FileSystemUsageCache::UpdateUsage(usage_file_path, 854238));
// DecrementDirty for dirty = 0 is invalid. It returns false.
- ASSERT_FALSE(FileSystemUsageCache::DecrementDirty(usage_file_path));
- ASSERT_TRUE(FileSystemUsageCache::IncrementDirty(usage_file_path));
+ ASSERT_EQ(false,
+ FileSystemUsageCache::DecrementDirty(usage_file_path));
+ ASSERT_EQ(true,
+ FileSystemUsageCache::IncrementDirty(usage_file_path));
// It tests DecrementDirty (which returns false) has no effect, i.e
// does not make dirty = -1 after DecrementDirty.
EXPECT_EQ(-1, FileSystemUsageCache::GetUsage(usage_file_path));
@@ -98,10 +104,12 @@ TEST_F(FileSystemUsageCacheTest, ManyIncsSameDecsAndGetSizeTest) {
ASSERT_EQ(FileSystemUsageCache::kUsageFileSize,
FileSystemUsageCache::UpdateUsage(usage_file_path, size));
for (int i = 0; i < 20; i++) {
- ASSERT_TRUE(FileSystemUsageCache::IncrementDirty(usage_file_path));
+ ASSERT_EQ(true,
+ FileSystemUsageCache::IncrementDirty(usage_file_path));
}
for (int i = 0; i < 20; i++) {
- ASSERT_TRUE(FileSystemUsageCache::DecrementDirty(usage_file_path));
+ ASSERT_EQ(true,
+ FileSystemUsageCache::DecrementDirty(usage_file_path));
}
EXPECT_EQ(size, FileSystemUsageCache::GetUsage(usage_file_path));
}
@@ -111,10 +119,12 @@ TEST_F(FileSystemUsageCacheTest, ManyIncsLessDecsAndGetSizeTest) {
ASSERT_EQ(FileSystemUsageCache::kUsageFileSize,
FileSystemUsageCache::UpdateUsage(usage_file_path, 19319));
for (int i = 0; i < 20; i++) {
- ASSERT_TRUE(FileSystemUsageCache::IncrementDirty(usage_file_path));
+ ASSERT_EQ(true,
+ FileSystemUsageCache::IncrementDirty(usage_file_path));
}
for (int i = 0; i < 19; i++) {
- ASSERT_TRUE(FileSystemUsageCache::DecrementDirty(usage_file_path));
+ ASSERT_EQ(true,
+ FileSystemUsageCache::DecrementDirty(usage_file_path));
}
EXPECT_EQ(-1, FileSystemUsageCache::GetUsage(usage_file_path));
}
@@ -126,10 +136,10 @@ TEST_F(FileSystemUsageCacheTest, GetSizeWithoutCacheFileTest) {
TEST_F(FileSystemUsageCacheTest, IncrementDirtyWithoutCacheFileTest) {
FilePath usage_file_path = GetUsageFilePath();
- EXPECT_FALSE(FileSystemUsageCache::IncrementDirty(usage_file_path));
+ EXPECT_EQ(false, FileSystemUsageCache::IncrementDirty(usage_file_path));
}
TEST_F(FileSystemUsageCacheTest, DecrementDirtyWithoutCacheFileTest) {
FilePath usage_file_path = GetUsageFilePath();
- EXPECT_FALSE(FileSystemUsageCache::IncrementDirty(usage_file_path));
+ EXPECT_EQ(false, FileSystemUsageCache::IncrementDirty(usage_file_path));
}