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

Unified Diff: chrome/browser/extensions/api/extension_action/page_action_apitest.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
Index: chrome/browser/extensions/api/extension_action/page_action_apitest.cc
diff --git a/chrome/browser/extensions/api/extension_action/page_action_apitest.cc b/chrome/browser/extensions/api/extension_action/page_action_apitest.cc
index ec9cb3a6c2e0d9b9714fabdb138a3feb1a4b4d1a..aafb5c1df30858c0d1666e0e05db055a3bbbf148 100644
--- a/chrome/browser/extensions/api/extension_action/page_action_apitest.cc
+++ b/chrome/browser/extensions/api/extension_action/page_action_apitest.cc
@@ -180,31 +180,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, OldPageActions) {
browser()->profile(), *extension->page_action(), tab_id, "", 1);
EXPECT_TRUE(catcher.GetNextResult());
}
-
- // Set icon by its index.
- {
- int tab_id =
- ExtensionTabUtil::GetTabId(chrome::GetActiveWebContents(browser()));
-
- // Set some icon so we can verify it gets cleaned up by setIconIndex.
- extension->page_action()->SetIcon(tab_id, CreateNonEmptyImage());
- ASSERT_FALSE(
- extension->page_action()->GetExplicitlySetIcon(tab_id).isNull());
-
- // Currently, icon index should be set to 0.
- ASSERT_EQ(0, extension->page_action()->GetIconIndex(tab_id));
-
- ResultCatcher catcher;
- ui_test_utils::NavigateToURL(browser(),
- GURL(extension->GetResourceURL("set_icon_index.html")));
- ASSERT_TRUE(catcher.GetNextResult());
-
- // Check new value of icon index is as expected.
- EXPECT_EQ(1, extension->page_action()->GetIconIndex(tab_id));
- // Explicitly set icon should have been reset.
- ASSERT_TRUE(
- extension->page_action()->GetExplicitlySetIcon(tab_id).isNull());
- }
}
// Tests popups in page actions.

Powered by Google App Engine
This is Rietveld 408576698