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

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

Issue 496863003: Consolidate ExtensionAction execution code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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/active_tab_apitest.cc
diff --git a/chrome/browser/extensions/active_tab_apitest.cc b/chrome/browser/extensions/active_tab_apitest.cc
index 1ad461c90149baccd4a4f8261c27778ee4648f1c..4fd05700d02dbe0a3bd8ed24345a7acf298f8908 100644
--- a/chrome/browser/extensions/active_tab_apitest.cc
+++ b/chrome/browser/extensions/active_tab_apitest.cc
@@ -3,8 +3,8 @@
// found in the LICENSE file.
#include "base/logging.h"
+#include "chrome/browser/extensions/api/extension_action/extension_action_api.h"
#include "chrome/browser/extensions/extension_apitest.h"
-#include "chrome/browser/extensions/extension_toolbar_model.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/ui_test_utils.h"
#include "extensions/common/extension.h"
@@ -26,9 +26,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_ActiveTab) {
LoadExtension(test_data_dir_.AppendASCII("active_tab"));
ASSERT_TRUE(extension);
- ExtensionToolbarModel* toolbar_model =
- ExtensionToolbarModel::Get(browser()->profile());
-
// Shouldn't be initially granted based on activeTab.
{
ResultCatcher catcher;
@@ -42,7 +39,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_ActiveTab) {
// Granting to the extension should give it access to page.html.
{
ResultCatcher catcher;
- toolbar_model->ExecuteBrowserAction(extension, browser(), NULL, true);
+ ExtensionActionAPI::Get(browser()->profile())->ExecuteExtensionAction(
+ extension, browser(), true);
EXPECT_TRUE(catcher.GetNextResult()) << message_;
}

Powered by Google App Engine
This is Rietveld 408576698