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

Unified Diff: chrome/common/extensions/extension_file_util_unittest.cc

Issue 204983020: Remove ExtensionService Garbage-Collecting methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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/common/extensions/extension_file_util_unittest.cc
diff --git a/chrome/common/extensions/extension_file_util_unittest.cc b/chrome/common/extensions/extension_file_util_unittest.cc
index ff5595fdbdb64ac0b722f222cecbce548542cea4..09e39fff7ed648906fb060081b724dd96dbdbba4 100644
--- a/chrome/common/extensions/extension_file_util_unittest.cc
+++ b/chrome/common/extensions/extension_file_util_unittest.cc
@@ -83,21 +83,9 @@ TEST_F(ExtensionFileUtilTest, InstallUninstallGarbageCollect) {
.value());
ASSERT_TRUE(base::DirectoryExists(version_3));
- // Collect garbage. Should remove first one.
- std::multimap<std::string, base::FilePath> extension_paths;
Yoyo Zhou 2014/03/26 01:54:12 Is this part of the code still tested?
Devlin 2014/03/26 23:56:32 Yes. This was specifically testing the file-threa
- extension_paths.insert(std::make_pair(extension_id,
- base::FilePath().AppendASCII(extension_id).Append(version_2.BaseName())));
- extension_paths.insert(std::make_pair(extension_id,
- base::FilePath().AppendASCII(extension_id).Append(version_3.BaseName())));
- extension_file_util::GarbageCollectExtensions(all_extensions,
- extension_paths,
- true);
- ASSERT_FALSE(base::DirectoryExists(version_1));
- ASSERT_TRUE(base::DirectoryExists(version_2));
- ASSERT_TRUE(base::DirectoryExists(version_3));
-
// Uninstall. Should remove entire extension subtree.
extension_file_util::UninstallExtension(all_extensions, extension_id);
+ ASSERT_FALSE(base::DirectoryExists(version_1.DirName()));
ASSERT_FALSE(base::DirectoryExists(version_2.DirName()));
ASSERT_FALSE(base::DirectoryExists(version_3.DirName()));
ASSERT_TRUE(base::DirectoryExists(all_extensions));

Powered by Google App Engine
This is Rietveld 408576698