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

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

Issue 10451012: Revert 138795 - Revert "nss: revert encrypted and origin bound certificates support." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/extensions/unpacked_installer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_service_unittest.cc
===================================================================
--- chrome/browser/extensions/extension_service_unittest.cc (revision 138795)
+++ chrome/browser/extensions/extension_service_unittest.cc (working copy)
@@ -1878,6 +1878,38 @@
// we should also test that preferences are preserved.
}
+#if defined(OS_POSIX)
+TEST_F(ExtensionServiceTest, UnpackedExtensionMayContainSymlinkedFiles) {
+ FilePath source_data_dir = data_dir_.
+ AppendASCII("unpacked").
+ AppendASCII("symlinks_allowed");
+
+ // Paths to test data files.
+ FilePath source_manifest = source_data_dir.AppendASCII("manifest.json");
+ ASSERT_TRUE(file_util::PathExists(source_manifest));
+ FilePath source_icon = source_data_dir.AppendASCII("icon.png");
+ ASSERT_TRUE(file_util::PathExists(source_icon));
+
+ // Set up the temporary extension directory.
+ ScopedTempDir temp;
+ ASSERT_TRUE(temp.CreateUniqueTempDir());
+ FilePath extension_path = temp.path();
+ FilePath manifest = extension_path.Append(Extension::kManifestFilename);
+ FilePath icon_symlink = extension_path.AppendASCII("icon.png");
+ file_util::CopyFile(source_manifest, manifest);
+ file_util::CreateSymbolicLink(source_icon, icon_symlink);
+
+ // Load extension.
+ InitializeEmptyExtensionService();
+ extensions::UnpackedInstaller::Create(service_)->Load(extension_path);
+ loop_.RunAllPending();
+
+ EXPECT_TRUE(GetErrors().empty());
+ ASSERT_EQ(1u, loaded_.size());
+ EXPECT_EQ(1u, service_->extensions()->size());
+}
+#endif
+
TEST_F(ExtensionServiceTest, InstallLocalizedTheme) {
InitializeEmptyExtensionService();
FilePath theme_path = data_dir_
« no previous file with comments | « no previous file | chrome/browser/extensions/unpacked_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698