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

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

Issue 19547009: Move ".crx"/".pem" constants and extension_filenames constants into extensions/common/constants.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
Index: chrome/browser/extensions/extension_service_unittest.cc
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc
index 8811e4881bd67555250671d99b7c7a74c26a7516..8f312960cc7de036ac7535e347004c1b89e3776e 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -140,6 +140,7 @@ using extensions::Manifest;
using extensions::PermissionSet;
using extensions::TestExtensionSystem;
using extensions::URLPatternSet;
+using extensions::filenames::kManifestFilename;
namespace keys = extension_manifest_keys;
@@ -2124,7 +2125,7 @@ TEST_F(ExtensionServiceTest, PackExtension) {
// Try packing with an invalid manifest.
std::string invalid_manifest_content = "I am not a manifest.";
ASSERT_TRUE(file_util::WriteFile(
- temp_dir2.path().Append(extensions::kManifestFilename),
+ temp_dir2.path().Append(kManifestFilename),
invalid_manifest_content.c_str(), invalid_manifest_content.size()));
creator.reset(new ExtensionCreator());
ASSERT_FALSE(creator->Run(temp_dir2.path(), crx_path, privkey_path,
@@ -2343,8 +2344,7 @@ TEST_F(ExtensionServiceTest, UnpackedExtensionCanChangeID) {
ASSERT_TRUE(temp.CreateUniqueTempDir());
base::FilePath extension_path = temp.path();
- base::FilePath manifest_path =
- extension_path.Append(extensions::kManifestFilename);
+ base::FilePath manifest_path = extension_path.Append(kManifestFilename);
base::FilePath manifest_no_key = data_dir_.
AppendASCII("unpacked").
AppendASCII("manifest_no_key.json");
@@ -2395,8 +2395,7 @@ TEST_F(ExtensionServiceTest, UnpackedExtensionMayContainSymlinkedFiles) {
base::ScopedTempDir temp;
ASSERT_TRUE(temp.CreateUniqueTempDir());
base::FilePath extension_path = temp.path();
- base::FilePath manifest = extension_path.Append(
- extensions::kManifestFilename);
+ base::FilePath manifest = extension_path.Append(kManifestFilename);
base::FilePath icon_symlink = extension_path.AppendASCII("icon.png");
base::CopyFile(source_manifest, manifest);
file_util::CreateSymbolicLink(source_icon, icon_symlink);
@@ -2840,8 +2839,7 @@ TEST_F(ExtensionServiceTest, LoadExtensionsCanDowngrade) {
// We'll write the extension manifest dynamically to a temporary path
// to make it easier to change the version number.
base::FilePath extension_path = temp.path();
- base::FilePath manifest_path =
- extension_path.Append(extensions::kManifestFilename);
+ base::FilePath manifest_path = extension_path.Append(kManifestFilename);
ASSERT_FALSE(base::PathExists(manifest_path));
// Start with version 2.0.
@@ -3409,7 +3407,7 @@ TEST_F(ExtensionServiceTest, ComponentExtensionWhitelisted) {
.AppendASCII("1.0.0.0");
std::string manifest;
ASSERT_TRUE(file_util::ReadFileToString(
- path.Append(extensions::kManifestFilename), &manifest));
+ path.Append(kManifestFilename), &manifest));
service_->component_loader()->Add(manifest, path);
service_->Init();
@@ -4859,7 +4857,7 @@ TEST(ExtensionServiceTestSimple, Enabledness) {
#endif
scoped_ptr<CommandLine> command_line;
base::FilePath install_dir = profile->GetPath()
- .AppendASCII(extensions::kInstallDirectoryName);
+ .AppendASCII(extensions::filenames::kInstallDirectoryName);
#if defined(ENABLE_PLUGINS)
webkit::npapi::MockPluginList plugin_list;
@@ -4990,7 +4988,7 @@ TEST_F(ExtensionServiceTest, ComponentExtensions) {
std::string manifest;
ASSERT_TRUE(file_util::ReadFileToString(
- path.Append(extensions::kManifestFilename), &manifest));
+ path.Append(kManifestFilename), &manifest));
service_->component_loader()->Add(manifest, path);
service_->Init();
@@ -5044,7 +5042,7 @@ TEST_F(ExtensionServiceTest, DeferredSyncStartupPreInstalledComponent) {
.AppendASCII("1.0.0.0");
std::string manifest;
ASSERT_TRUE(file_util::ReadFileToString(
- path.Append(extensions::kManifestFilename), &manifest));
+ path.Append(kManifestFilename), &manifest));
service_->component_loader()->Add(manifest, path);
ASSERT_FALSE(service_->is_ready());
service_->Init();

Powered by Google App Engine
This is Rietveld 408576698