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

Unified Diff: content/browser/appcache/appcache_disk_cache_unittest.cc

Issue 2316043002: //content: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Just rebased Created 4 years, 3 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: content/browser/appcache/appcache_disk_cache_unittest.cc
diff --git a/content/browser/appcache/appcache_disk_cache_unittest.cc b/content/browser/appcache/appcache_disk_cache_unittest.cc
index c1dda72aa8d1ff55b452a26a1afba0951856584b..ff923d10bdce95431129a4276be7cd38f9152098 100644
--- a/content/browser/appcache/appcache_disk_cache_unittest.cc
+++ b/content/browser/appcache/appcache_disk_cache_unittest.cc
@@ -58,8 +58,8 @@ TEST_F(AppCacheDiskCacheTest, DisablePriorToInitCompletion) {
// one of each kind of "entry" function.
std::unique_ptr<AppCacheDiskCache> disk_cache(new AppCacheDiskCache);
EXPECT_FALSE(disk_cache->is_disabled());
- disk_cache->InitWithDiskBackend(
- directory_.path(), k10MBytes, false, cache_thread_, completion_callback_);
+ disk_cache->InitWithDiskBackend(directory_.GetPath(), k10MBytes, false,
+ cache_thread_, completion_callback_);
disk_cache->CreateEntry(1, &entry, completion_callback_);
disk_cache->OpenEntry(2, &entry, completion_callback_);
disk_cache->DoomEntry(3, completion_callback_);
@@ -79,18 +79,18 @@ TEST_F(AppCacheDiskCacheTest, DisablePriorToInitCompletion) {
}
// Ensure the directory can be deleted at this point.
- EXPECT_TRUE(base::DirectoryExists(directory_.path()));
- EXPECT_FALSE(base::IsDirectoryEmpty(directory_.path()));
- EXPECT_TRUE(base::DeleteFile(directory_.path(), true));
- EXPECT_FALSE(base::DirectoryExists(directory_.path()));
+ EXPECT_TRUE(base::DirectoryExists(directory_.GetPath()));
+ EXPECT_FALSE(base::IsDirectoryEmpty(directory_.GetPath()));
+ EXPECT_TRUE(base::DeleteFile(directory_.GetPath(), true));
+ EXPECT_FALSE(base::DirectoryExists(directory_.GetPath()));
}
TEST_F(AppCacheDiskCacheTest, DisableAfterInitted) {
// Create an instance and let it fully init.
std::unique_ptr<AppCacheDiskCache> disk_cache(new AppCacheDiskCache);
EXPECT_FALSE(disk_cache->is_disabled());
- disk_cache->InitWithDiskBackend(
- directory_.path(), k10MBytes, false, cache_thread_, completion_callback_);
+ disk_cache->InitWithDiskBackend(directory_.GetPath(), k10MBytes, false,
+ cache_thread_, completion_callback_);
FlushCacheTasks();
EXPECT_EQ(1u, completion_results_.size());
EXPECT_EQ(net::OK, completion_results_[0]);
@@ -100,10 +100,10 @@ TEST_F(AppCacheDiskCacheTest, DisableAfterInitted) {
FlushCacheTasks();
// Ensure the directory can be deleted at this point.
- EXPECT_TRUE(base::DirectoryExists(directory_.path()));
- EXPECT_FALSE(base::IsDirectoryEmpty(directory_.path()));
- EXPECT_TRUE(base::DeleteFile(directory_.path(), true));
- EXPECT_FALSE(base::DirectoryExists(directory_.path()));
+ EXPECT_TRUE(base::DirectoryExists(directory_.GetPath()));
+ EXPECT_FALSE(base::IsDirectoryEmpty(directory_.GetPath()));
+ EXPECT_TRUE(base::DeleteFile(directory_.GetPath(), true));
+ EXPECT_FALSE(base::DirectoryExists(directory_.GetPath()));
// Methods should return immediately when disabled and not invoke
// the callback at all.
@@ -124,8 +124,8 @@ TEST_F(AppCacheDiskCacheTest, DISABLED_DisableWithEntriesOpen) {
// Create an instance and let it fully init.
std::unique_ptr<AppCacheDiskCache> disk_cache(new AppCacheDiskCache);
EXPECT_FALSE(disk_cache->is_disabled());
- disk_cache->InitWithDiskBackend(
- directory_.path(), k10MBytes, false, cache_thread_, completion_callback_);
+ disk_cache->InitWithDiskBackend(directory_.GetPath(), k10MBytes, false,
+ cache_thread_, completion_callback_);
FlushCacheTasks();
EXPECT_EQ(1u, completion_results_.size());
EXPECT_EQ(net::OK, completion_results_[0]);
@@ -164,10 +164,10 @@ TEST_F(AppCacheDiskCacheTest, DISABLED_DisableWithEntriesOpen) {
FlushCacheTasks();
// Ensure the directory can be deleted at this point.
- EXPECT_TRUE(base::DirectoryExists(directory_.path()));
- EXPECT_FALSE(base::IsDirectoryEmpty(directory_.path()));
- EXPECT_TRUE(base::DeleteFile(directory_.path(), true));
- EXPECT_FALSE(base::DirectoryExists(directory_.path()));
+ EXPECT_TRUE(base::DirectoryExists(directory_.GetPath()));
+ EXPECT_FALSE(base::IsDirectoryEmpty(directory_.GetPath()));
+ EXPECT_TRUE(base::DeleteFile(directory_.GetPath(), true));
+ EXPECT_FALSE(base::DirectoryExists(directory_.GetPath()));
disk_cache.reset(NULL);
« no previous file with comments | « content/browser/appcache/appcache_database_unittest.cc ('k') | content/browser/appcache/appcache_storage_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698