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

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

Issue 7574017: Make extension file URL access opt-in. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: keep LOAD the same Created 9 years, 4 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 | « chrome/browser/extensions/extension_service.cc ('k') | chrome/test/data/extensions/good/Preferences » ('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
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc
index 8d7ea1a5df23189c576f7a99d04c7ff3c1a1e172..b00250123845d0b35548cf9b3463ca8eecdb83f5 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -1756,6 +1756,18 @@ TEST_F(ExtensionServiceTest, InstallApps) {
ValidatePrefKeyCount(pref_count);
}
+// Tests that file access is OFF by default.
+TEST_F(ExtensionServiceTest, DefaultFileAccess) {
+ InitializeEmptyExtensionService();
+ PackAndInstallCrx(data_dir_.AppendASCII("permissions").AppendASCII("files"),
+ true);
+
+ EXPECT_EQ(0u, GetErrors().size());
+ EXPECT_EQ(1u, service_->extensions()->size());
+ std::string id = service_->extensions()->at(0)->id();
+ EXPECT_FALSE(service_->extension_prefs()->AllowFileAccess(id));
+}
+
TEST_F(ExtensionServiceTest, UpdateApps) {
InitializeEmptyExtensionService();
FilePath extensions_path = data_dir_.AppendASCII("app_update");
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/test/data/extensions/good/Preferences » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698