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

Unified Diff: chrome/common/extensions/extension_action_unittest.cc

Issue 10914244: Remove support for page_action.icons, and the legacy code surrounding it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: constants removed Created 8 years, 3 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/common/extensions/extension_action.cc ('k') | chrome/common/extensions/extension_file_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension_action_unittest.cc
diff --git a/chrome/common/extensions/extension_action_unittest.cc b/chrome/common/extensions/extension_action_unittest.cc
index c36492a26d0e656e23cbedd63ea431746c829f08..f34ab88a0ca604864090493067ee193d68a96d84 100644
--- a/chrome/common/extensions/extension_action_unittest.cc
+++ b/chrome/common/extensions/extension_action_unittest.cc
@@ -74,7 +74,7 @@ TEST_F(ExtensionActionTest, Icon) {
action.set_default_icon_path("the_default.png");
ASSERT_TRUE(ImagesAreEqual(puzzle_piece, action.GetIcon(1)))
<< "Still returns the puzzle piece because the image isn't loaded yet.";
- action.CacheIcon("the_default.png", icon2);
+ action.CacheIcon(icon2);
ASSERT_TRUE(ImagesAreEqual(icon2, action.GetIcon(1)));
action.SetIcon(ExtensionAction::kDefaultTabId, icon1);
@@ -86,32 +86,6 @@ TEST_F(ExtensionActionTest, Icon) {
ASSERT_TRUE(ImagesAreEqual(icon2, action.GetIcon(100)));
}
-TEST_F(ExtensionActionTest, IconIndex) {
- gfx::Image icon1 = LoadIcon("icon1.png");
- gfx::Image icon2 = LoadIcon("icon2.png");
- gfx::Image puzzle_piece =
- ui::ResourceBundle::GetSharedInstance().GetImageNamed(
- IDR_EXTENSIONS_FAVICON);
-
- ASSERT_EQ(-1, action.GetIconIndex(1));
- action.icon_paths()->push_back("foo.png");
- action.icon_paths()->push_back("bar.png");
- action.SetIconIndex(ExtensionAction::kDefaultTabId, 1);
- ASSERT_EQ(1, action.GetIconIndex(1));
- ASSERT_EQ(1, action.GetIconIndex(100));
- ASSERT_TRUE(ImagesAreEqual(puzzle_piece, action.GetIcon(100)))
- << "Non-loaded icon gets the puzzle piece.";
- action.CacheIcon("bar.png", icon1);
- ASSERT_TRUE(ImagesAreEqual(icon1, action.GetIcon(100)));
-
- action.SetIconIndex(100, 0);
- ASSERT_EQ(0, action.GetIconIndex(100));
- ASSERT_EQ(1, action.GetIconIndex(1));
- action.ClearAllValuesForTab(100);
- ASSERT_EQ(1, action.GetIconIndex(100));
- ASSERT_EQ(1, action.GetIconIndex(1));
-}
-
TEST_F(ExtensionActionTest, Visibility) {
// Supports the icon animation.
MessageLoop message_loop;
« no previous file with comments | « chrome/common/extensions/extension_action.cc ('k') | chrome/common/extensions/extension_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698