| Index: chrome/common/extensions/extension_unittest.cc
|
| diff --git a/chrome/common/extensions/extension_unittest.cc b/chrome/common/extensions/extension_unittest.cc
|
| index e43ed7ea2a8df6c6e6af86500e91d88c733406b5..e6037971740f14737fd9fd166b1acb801a29edbd 100644
|
| --- a/chrome/common/extensions/extension_unittest.cc
|
| +++ b/chrome/common/extensions/extension_unittest.cc
|
| @@ -46,6 +46,12 @@ namespace errors = extension_manifest_errors;
|
|
|
| namespace {
|
|
|
| +std::string GetPageActionIconPathAt(const ExtensionAction* action, int index) {
|
| + const ExtensionIconSet* icon_set = action->page_action_icons()[index];
|
| + return icon_set->Get(extension_misc::EXTENSION_ICON_ACTION,
|
| + ExtensionIconSet::MATCH_EXACTLY);
|
| +}
|
| +
|
| void CompareLists(const std::vector<std::string>& expected,
|
| const std::vector<std::string>& actual) {
|
| ASSERT_EQ(expected.size(), actual.size());
|
| @@ -230,9 +236,9 @@ TEST(ExtensionTest, LoadPageActionHelper) {
|
|
|
| // No title, so fall back to name.
|
| ASSERT_EQ(name, action->GetTitle(1));
|
| - ASSERT_EQ(2u, action->icon_paths()->size());
|
| - ASSERT_EQ(img1, (*action->icon_paths())[0]);
|
| - ASSERT_EQ(img2, (*action->icon_paths())[1]);
|
| + ASSERT_EQ(2u, action->page_action_icons().size());
|
| + ASSERT_EQ(img1, GetPageActionIconPathAt(action.get(), 0));
|
| + ASSERT_EQ(img2, GetPageActionIconPathAt(action.get(), 1));
|
|
|
| // Same test with explicitly set type.
|
| action = LoadAction("page_action_type.json");
|
| @@ -259,7 +265,7 @@ TEST(ExtensionTest, LoadPageActionHelper) {
|
| action = LoadAction("page_action_new_format.json");
|
| ASSERT_TRUE(action.get());
|
| ASSERT_EQ(kTitle, action->GetTitle(1));
|
| - ASSERT_EQ(0u, action->icon_paths()->size());
|
| + ASSERT_EQ(0u, action->page_action_icons().size());
|
|
|
| // Invalid title should give an error even with a valid name.
|
| LoadActionAndExpectError("page_action_invalid_title.json",
|
|
|