Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4724)

Unified Diff: chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc

Issue 10702133: gdata: Remove sub_dir_type from CacheEntry for simplicity (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: the fix Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_cache_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc b/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
index d5d623f8038fd1f2ecba480735c1ae60d0bc9aa4..9f1df6cff096fa6d69823e70182e165423dc25b3 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
+++ b/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
@@ -666,8 +666,9 @@ class GDataFileSystemTest : public testing::Test {
const std::string& md5,
const FilePath& cache_file_path) {
expected_error_ = base::PLATFORM_FILE_OK;
- expected_cache_state_ =
- GDataCache::CACHE_STATE_PRESENT | GDataCache::CACHE_STATE_DIRTY;
+ expected_cache_state_ = (GDataCache::CACHE_STATE_PRESENT |
+ GDataCache::CACHE_STATE_DIRTY |
+ GDataCache::CACHE_STATE_PERSISTENT);
expected_sub_dir_type_ = GDataCache::CACHE_TYPE_PERSISTENT;
expect_outgoing_symlink_ = false;
VerifyMarkDirty(error, resource_id, md5, cache_file_path);
@@ -680,8 +681,9 @@ class GDataFileSystemTest : public testing::Test {
const std::string& resource_id,
const std::string& md5) {
expected_error_ = base::PLATFORM_FILE_OK;
- expected_cache_state_ =
- GDataCache::CACHE_STATE_PRESENT | GDataCache::CACHE_STATE_DIRTY;
+ expected_cache_state_ = (GDataCache::CACHE_STATE_PRESENT |
+ GDataCache::CACHE_STATE_DIRTY |
+ GDataCache::CACHE_STATE_PERSISTENT);
expected_sub_dir_type_ = GDataCache::CACHE_TYPE_PERSISTENT;
expect_outgoing_symlink_ = true;
VerifyCacheFileState(error, resource_id, md5);
@@ -701,7 +703,7 @@ class GDataFileSystemTest : public testing::Test {
GDataCache::IsCachePinned(expected_cache_state_)) {
ASSERT_TRUE(cache_entry.get());
EXPECT_EQ(expected_cache_state_, cache_entry->cache_state);
- EXPECT_EQ(expected_sub_dir_type_, cache_entry->sub_dir_type);
+ EXPECT_EQ(expected_sub_dir_type_, cache_entry->GetSubDirectoryType());
} else {
EXPECT_FALSE(cache_entry.get());
}
@@ -2376,7 +2378,8 @@ TEST_F(GDataFileSystemTest, UpdateFileByResourceId_PersistentFile) {
GetTestFilePath("root_feed.json"), // Anything works.
base::PLATFORM_FILE_OK,
GDataCache::CACHE_STATE_PRESENT |
- GDataCache::CACHE_STATE_PINNED,
+ GDataCache::CACHE_STATE_PINNED |
+ GDataCache::CACHE_STATE_PERSISTENT,
GDataCache::CACHE_TYPE_PERSISTENT);
ASSERT_TRUE(file_util::PathExists(original_cache_file_path));
@@ -2387,7 +2390,8 @@ TEST_F(GDataFileSystemTest, UpdateFileByResourceId_PersistentFile) {
base::PLATFORM_FILE_OK,
GDataCache::CACHE_STATE_PRESENT |
GDataCache::CACHE_STATE_PINNED |
- GDataCache::CACHE_STATE_DIRTY,
+ GDataCache::CACHE_STATE_DIRTY |
+ GDataCache::CACHE_STATE_PERSISTENT,
GDataCache::CACHE_TYPE_PERSISTENT);
const FilePath dirty_cache_file_path =
GDataCache::GetCacheRootPath(profile_.get())
@@ -2405,7 +2409,8 @@ TEST_F(GDataFileSystemTest, UpdateFileByResourceId_PersistentFile) {
base::PLATFORM_FILE_OK,
GDataCache::CACHE_STATE_PRESENT |
GDataCache::CACHE_STATE_PINNED |
- GDataCache::CACHE_STATE_DIRTY,
+ GDataCache::CACHE_STATE_DIRTY |
+ GDataCache::CACHE_STATE_PERSISTENT,
GDataCache::CACHE_TYPE_PERSISTENT);
const FilePath outgoing_symlink_path =
GDataCache::GetCacheRootPath(profile_.get())
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_cache_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698