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

Unified Diff: chrome/browser/extensions/extension_test_notification_observer.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
Index: chrome/browser/extensions/extension_test_notification_observer.cc
diff --git a/chrome/browser/extensions/extension_test_notification_observer.cc b/chrome/browser/extensions/extension_test_notification_observer.cc
index fb8c7f7d8e590fa6d01033deaa654fb7bceb3538..feb8c3610e143a16cf0890f474f39121b2058eee 100644
--- a/chrome/browser/extensions/extension_test_notification_observer.cc
+++ b/chrome/browser/extensions/extension_test_notification_observer.cc
@@ -5,10 +5,12 @@
#include "chrome/browser/extensions/extension_test_notification_observer.h"
#include "base/callback_list.h"
+#include "chrome/browser/extensions/extension_action_test_util.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
+#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_view_host.h"
@@ -26,9 +28,10 @@ namespace {
typedef base::Callback<bool(void)> ConditionCallback;
bool HasPageActionVisibilityReachedTarget(
- LocationBarTesting* location_bar, int target_visible_page_action_count) {
- return location_bar->PageActionVisibleCount() ==
- target_visible_page_action_count;
+ Browser* browser, size_t target_visible_page_action_count) {
+ return extensions::extension_action_test_util::GetVisiblePageActionCount(
+ browser->tab_strip_model()->GetActiveWebContents()) ==
+ target_visible_page_action_count;
}
bool HaveAllExtensionRenderViewHostsFinishedLoading(
@@ -125,11 +128,9 @@ void ExtensionTestNotificationObserver::WaitForNotification(
bool ExtensionTestNotificationObserver::WaitForPageActionVisibilityChangeTo(
int count) {
- LocationBarTesting* location_bar =
- browser_->window()->GetLocationBar()->GetLocationBarForTesting();
extensions::ExtensionActionAPI::Get(GetProfile())->AddObserver(this);
WaitForCondition(
- base::Bind(&HasPageActionVisibilityReachedTarget, location_bar, count),
+ base::Bind(&HasPageActionVisibilityReachedTarget, browser_, count),
NULL);
extensions::ExtensionActionAPI::Get(GetProfile())->
RemoveObserver(this);
« no previous file with comments | « chrome/browser/extensions/extension_action_test_util.cc ('k') | chrome/browser/extensions/location_bar_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698