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

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

Issue 10545084: Move chromeos::GDataFileSystem::GetCacheDirectoryPath and GetCacheFilePath implementation to GDataC… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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
Index: chrome/browser/chromeos/gdata/gdata_cache_unittest.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_cache_unittest.cc b/chrome/browser/chromeos/gdata/gdata_cache_unittest.cc
index 116e06826a34ab4b882a3a023187971f24647ff9..46cc140cb8a58c191686a25c91b634398dbfff01 100644
--- a/chrome/browser/chromeos/gdata/gdata_cache_unittest.cc
+++ b/chrome/browser/chromeos/gdata/gdata_cache_unittest.cc
@@ -15,6 +15,8 @@
namespace gdata {
namespace {
+const char kTestCacheRootPath[] = "/";
+
// Helper function to insert an item with key |resource_id| into |cache_map|.
// |md5|, |sub_dir_type|, |cache_state| are used to create the value CacheEntry.
void InsertIntoMap(GDataCache::CacheMap* cache_map,
@@ -28,7 +30,8 @@ void InsertIntoMap(GDataCache::CacheMap* cache_map,
// Test all the api methods of GDataCache except for RemoveTemporaryFiles.
TEST(GDataCacheTest, CacheTest) {
- scoped_ptr<GDataCache> cache(GDataCache::CreateGDataCache());
+ scoped_ptr<GDataCache> cache(GDataCache::CreateGDataCache(
+ FilePath(kTestCacheRootPath)));
// Save an initial entry.
std::string test_resource_id("test_resource_id");
@@ -159,7 +162,8 @@ TEST(GDataCacheTest, RemoveTemporaryFilesTest) {
GDataCache::CACHE_TYPE_TMP,
GDataCache::CACHE_STATE_PRESENT);
- scoped_ptr<GDataCache> cache(GDataCache::CreateGDataCache());
+ scoped_ptr<GDataCache> cache(GDataCache::CreateGDataCache(
+ FilePath(kTestCacheRootPath)));
cache->SetCacheMap(cache_map);
cache->RemoveTemporaryFiles();
// resource 1 and 4 should be gone, as these are CACHE_TYPE_TMP.

Powered by Google App Engine
This is Rietveld 408576698