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

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

Issue 2738553002: [Extensions] Log instances of invalid extensions being added (Closed)
Patch Set: . Created 3 years, 9 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_action_icon_factory_unittest.cc
diff --git a/chrome/browser/extensions/extension_action_icon_factory_unittest.cc b/chrome/browser/extensions/extension_action_icon_factory_unittest.cc
index 692e9dfe2419653b18283c4623a79960e697e22c..fb0f0cc091cf96081e5ff06cb3e3edc9e60ff9e9 100644
--- a/chrome/browser/extensions/extension_action_icon_factory_unittest.cc
+++ b/chrome/browser/extensions/extension_action_icon_factory_unittest.cc
@@ -96,8 +96,7 @@ class ExtensionActionIconFactoryTest
quit_in_icon_updated_ = false;
}
- scoped_refptr<Extension> CreateExtension(const char* name,
- Manifest::Location location) {
+ scoped_refptr<Extension> CreateExtension(const char* name) {
// Create and load an extension.
base::FilePath test_file;
if (!PathService::Get(chrome::DIR_TEST_DATA, &test_file)) {
@@ -121,7 +120,7 @@ class ExtensionActionIconFactoryTest
return NULL;
scoped_refptr<Extension> extension =
- Extension::Create(test_file, location, *valid_value,
+ Extension::Create(test_file, Manifest::UNPACKED, *valid_value,
Extension::NO_FLAGS, &error);
EXPECT_TRUE(extension.get()) << error;
if (extension.get())
@@ -191,8 +190,7 @@ INSTANTIATE_TEST_CASE_P(
TEST_P(ExtensionActionIconFactoryTest, NoIcons) {
// Load an extension that has browser action without default icon set in the
// manifest and does not call |SetIcon| by default.
- scoped_refptr<Extension> extension(CreateExtension(
- "browser_action/no_icon", Manifest::INVALID_LOCATION));
+ scoped_refptr<Extension> extension(CreateExtension("browser_action/no_icon"));
ASSERT_TRUE(extension.get() != NULL);
ExtensionAction* browser_action = GetBrowserAction(*extension);
ASSERT_TRUE(browser_action);
@@ -216,8 +214,7 @@ TEST_P(ExtensionActionIconFactoryTest, AfterSetIcon) {
// Load an extension that has browser action without default icon set in the
// manifest and does not call |SetIcon| by default (but has an browser action
// icon resource).
- scoped_refptr<Extension> extension(CreateExtension(
- "browser_action/no_icon", Manifest::INVALID_LOCATION));
+ scoped_refptr<Extension> extension(CreateExtension("browser_action/no_icon"));
ASSERT_TRUE(extension.get() != NULL);
ExtensionAction* browser_action = GetBrowserAction(*extension);
ASSERT_TRUE(browser_action);
@@ -255,8 +252,7 @@ TEST_P(ExtensionActionIconFactoryTest, DefaultIcon) {
// Load an extension that has browser action without default icon set in the
// manifest and does not call |SetIcon| by default (but has an browser action
// icon resource).
- scoped_refptr<Extension> extension(CreateExtension(
- "browser_action/no_icon", Manifest::INVALID_LOCATION));
+ scoped_refptr<Extension> extension(CreateExtension("browser_action/no_icon"));
ASSERT_TRUE(extension.get() != NULL);
ExtensionAction* browser_action = GetBrowserAction(*extension);
ASSERT_TRUE(browser_action);
@@ -264,7 +260,7 @@ TEST_P(ExtensionActionIconFactoryTest, DefaultIcon) {
ASSERT_TRUE(browser_action->GetExplicitlySetIcon(0 /*tab id*/).IsEmpty());
scoped_refptr<const Extension> extension_with_icon =
- CreateExtension("browser_action_with_icon", Manifest::INVALID_LOCATION);
+ CreateExtension("browser_action_with_icon");
ASSERT_TRUE(extension_with_icon);
int icon_size = ExtensionAction::ActionIconSize();

Powered by Google App Engine
This is Rietveld 408576698