Index: chrome/browser/extensions/api/extension_action/browser_action_apitest.cc |
diff --git a/chrome/browser/extensions/api/extension_action/browser_action_apitest.cc b/chrome/browser/extensions/api/extension_action/browser_action_apitest.cc |
index ba869826d8fd555ad829899feb66833927efaab9..eb6cc001d63443c50f64cbb722b8f54eab8d647e 100644 |
--- a/chrome/browser/extensions/api/extension_action/browser_action_apitest.cc |
+++ b/chrome/browser/extensions/api/extension_action/browser_action_apitest.cc |
@@ -3,6 +3,7 @@ |
// found in the LICENSE file. |
#include "build/build_config.h" |
+#include "chrome/browser/extensions/api/extension_action/extension_action_api.h" |
#include "chrome/browser/extensions/browser_action_test_util.h" |
#include "chrome/browser/extensions/extension_action.h" |
#include "chrome/browser/extensions/extension_action_icon_factory.h" |
@@ -115,9 +116,8 @@ IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, Basic) { |
ui_test_utils::NavigateToURL(browser(), |
test_server()->GetURL("files/extensions/test_file.txt")); |
- ExtensionToolbarModel* toolbar_model = ExtensionToolbarModel::Get( |
- browser()->profile()); |
- toolbar_model->ExecuteBrowserAction(extension, browser(), NULL, true); |
+ ExtensionActionAPI::Get(browser()->profile())->ExecuteExtensionAction( |
+ extension, browser(), true); |
ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
} |
@@ -592,14 +592,16 @@ IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, IncognitoSplit) { |
BrowserActionTestUtil(incognito_browser).NumberOfBrowserActions()); |
// A click in the regular profile should open a tab in the regular profile. |
- ExtensionToolbarModel* toolbar_model = ExtensionToolbarModel::Get( |
- browser()->profile()); |
- toolbar_model->ExecuteBrowserAction(extension, browser(), NULL, true); |
+ ExtensionActionAPI* extension_action_api = |
+ ExtensionActionAPI::Get(browser()->profile()); |
+ extension_action_api->ExecuteExtensionAction( |
+ extension, browser(), true); |
ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
// A click in the incognito profile should open a tab in the |
// incognito profile. |
- toolbar_model->ExecuteBrowserAction(extension, incognito_browser, NULL, true); |
+ extension_action_api->ExecuteExtensionAction( |
+ extension, incognito_browser, true); |
ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
} |
@@ -622,9 +624,8 @@ IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, DISABLED_CloseBackgroundPage) { |
content::NotificationService::AllSources()); |
// Click the browser action. |
- ExtensionToolbarModel* toolbar_model = ExtensionToolbarModel::Get( |
- browser()->profile()); |
- toolbar_model->ExecuteBrowserAction(extension, browser(), NULL, true); |
+ ExtensionActionAPI::Get(browser()->profile())->ExecuteExtensionAction( |
+ extension, browser(), true); |
// It can take a moment for the background page to actually get destroyed |
// so we wait for the notification before checking that it's really gone |