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

Unified Diff: chrome/browser/extensions/api/extension_action/page_as_browser_action_apitest.cc

Issue 10905005: Change browser/page action default icon defined in manifest to support hidpi. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missing test for icon factory; need to update comments in browser/ui/ 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_as_browser_action_apitest.cc
diff --git a/chrome/browser/extensions/api/extension_action/page_as_browser_action_apitest.cc b/chrome/browser/extensions/api/extension_action/page_as_browser_action_apitest.cc
index 95136cdd506783eecbd1105e92794c5ecaa16ab9..5bcc8580663cc7c6e17a16ea3e57fcc1947f6d3f 100644
--- a/chrome/browser/extensions/api/extension_action/page_as_browser_action_apitest.cc
+++ b/chrome/browser/extensions/api/extension_action/page_as_browser_action_apitest.cc
@@ -4,6 +4,7 @@
#include "base/command_line.h"
#include "chrome/browser/extensions/browser_action_test_util.h"
+#include "chrome/browser/extensions/extension_action_icon_factory.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/extensions/extension_prefs.h"
#include "chrome/browser/extensions/extension_service.h"
@@ -19,11 +20,13 @@
#include "chrome/common/extensions/extension_action.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/browser/web_contents.h"
+#include "testing/gmock/include/gmock/gmock.h"
// These are a mash-up of the tests from from page_actions_apitest.cc and
// browser_actions_apitest.cc.
using extensions::Extension;
+using ::testing::_;
namespace {
@@ -93,8 +96,12 @@ IN_PROC_BROWSER_TEST_F(PageAsBrowserActionApiTest, Basic) {
ASSERT_TRUE(catcher.GetNextResult());
}
+ // We should not be creating icons asynchronoulsy, so we don't need an
+ // observer.
+ ExtensionActionIconFactory icon_factory(extension, NULL);
+
// Test that we received the changes.
- EXPECT_FALSE(action->GetIcon(tab_id).IsEmpty());
+ EXPECT_FALSE(icon_factory.GetIcon(action, tab_id).IsEmpty());
}
// Test that calling chrome.pageAction.setPopup() can enable a popup.

Powered by Google App Engine
This is Rietveld 408576698