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

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

Issue 10217017: Allow features to refer to subkeys in _manifest_features.json. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix theme test Created 8 years, 8 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/common/extensions/api/_manifest_features.json » ('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 00a7c70e4c278bc5d3e98217590c7b5db611b590..fb7a0b2625cab8f92f6a11acc7949a170f881bfe 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -1825,12 +1825,17 @@ TEST_F(ExtensionServiceTest, InstallTheme) {
ValidateIntegerPref(theme2_crx, "state", Extension::ENABLED);
ValidateIntegerPref(theme2_crx, "location", Extension::INTERNAL);
- // A theme with extension elements. Themes cannot have extension elements so
- // this test should fail.
+ // A theme with extension elements. Themes cannot have extension elements,
+ // so any such elements (like content scripts) should be ignored.
set_extensions_enabled(true);
- path = data_dir_.AppendASCII("theme_with_extension.crx");
- InstallCRX(path, INSTALL_FAILED);
- ValidatePrefKeyCount(pref_count);
+ {
+ path = data_dir_.AppendASCII("theme_with_extension.crx");
+ const Extension* extension = InstallCRX(path, INSTALL_NEW);
+ ValidatePrefKeyCount(++pref_count);
+ ASSERT_TRUE(extension);
+ EXPECT_TRUE(extension->is_theme());
+ EXPECT_EQ(0u, extension->content_scripts().size());
+ }
// A theme with image resources missing (misspelt path).
path = data_dir_.AppendASCII("theme_missing_image.crx");
« no previous file with comments | « no previous file | chrome/common/extensions/api/_manifest_features.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698