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

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

Issue 516633002: Stop showing page actions in the location bar with redesign enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest CQ for Master 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
« no previous file with comments | « chrome/browser/extensions/location_bar_controller.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/page_action_browsertest.cc
diff --git a/chrome/browser/extensions/page_action_browsertest.cc b/chrome/browser/extensions/page_action_browsertest.cc
index 2b87b2664add05c99dabd9747ebdb0b4bc6f774d..b8f91f2dc944d808c0b48b31833c9c94cb1e9bfa 100644
--- a/chrome/browser/extensions/page_action_browsertest.cc
+++ b/chrome/browser/extensions/page_action_browsertest.cc
@@ -5,12 +5,12 @@
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/extensions/extension_action.h"
#include "chrome/browser/extensions/extension_action_manager.h"
+#include "chrome/browser/extensions/extension_action_test_util.h"
#include "chrome/browser/extensions/extension_browsertest.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_tab_util.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
-#include "chrome/browser/ui/location_bar/location_bar.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/test/base/ui_test_utils.h"
#include "extensions/browser/extension_system.h"
@@ -108,14 +108,14 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, UnloadPageAction) {
// Navigation prompts the location bar to load page actions.
GURL feed_url = test_server()->GetURL(kFeedPage);
ui_test_utils::NavigateToURL(browser(), feed_url);
- LocationBarTesting* location_bar =
- browser()->window()->GetLocationBar()->GetLocationBarForTesting();
- EXPECT_EQ(1, location_bar->PageActionCount());
+ content::WebContents* tab =
+ browser()->tab_strip_model()->GetActiveWebContents();
+ EXPECT_EQ(1u, extension_action_test_util::GetTotalPageActionCount(tab));
UnloadExtension(last_loaded_extension_id());
// Make sure the page action goes away when it's unloaded.
- EXPECT_EQ(0, location_bar->PageActionCount());
+ EXPECT_EQ(0u, extension_action_test_util::GetTotalPageActionCount(tab));
}
// Tests that we can load page actions in the Omnibox.
« no previous file with comments | « chrome/browser/extensions/location_bar_controller.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698