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

Unified Diff: chrome/browser/extensions/extension_updater_unittest.cc

Issue 256049: Generate IDs for --load-extension by hashing the path instead (Closed)
Patch Set: Removed support for default Extension constructor Created 11 years, 2 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/extensions/extension_updater_unittest.cc
diff --git a/chrome/browser/extensions/extension_updater_unittest.cc b/chrome/browser/extensions/extension_updater_unittest.cc
index e9892a23c36e337c542cd3eea45011398d72aa68..69f2460b97abb6715145dae7467c29ca419fa2cb 100644
--- a/chrome/browser/extensions/extension_updater_unittest.cc
+++ b/chrome/browser/extensions/extension_updater_unittest.cc
@@ -79,8 +79,6 @@ class ScopedTempPrefService {
scoped_ptr<PrefService> prefs_;
};
-const char* kIdPrefix = "000000000000000000000000000000000000000";
-
// Creates test extensions and inserts them into list. The name and
// version are all based on their index. If |update_url| is non-null, it
// will be used as the update_url for each extension.
@@ -88,7 +86,12 @@ void CreateTestExtensions(int count, ExtensionList *list,
const std::string* update_url) {
for (int i = 1; i <= count; i++) {
DictionaryValue input;
- Extension* e = new Extension();
+#if defined(OS_WIN)
+ FilePath path(StringPrintf(L"c:\\extension%i", i));
+#else
+ FilePath path(StringPrintf("/extension%i", i));
+#endif
+ Extension* e = new Extension(path);
input.SetString(extension_manifest_keys::kVersion,
StringPrintf("%d.0.0.0", i));
input.SetString(extension_manifest_keys::kName,
« no previous file with comments | « chrome/browser/extensions/extension_browsertests_misc.cc ('k') | chrome/browser/extensions/extensions_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698