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

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

Issue 475813004: Clean up NOTIFICATION_EXTENSION_PAGE_ACTION_[ COUNT | VISIBILITY ]_CHANGED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac Compile Fix 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/page_action_browsertest.cc
diff --git a/chrome/browser/extensions/page_action_browsertest.cc b/chrome/browser/extensions/page_action_browsertest.cc
index 397fdce961ac4d2cc2bb42dd875b8e46e9e84192..2b87b2664add05c99dabd9747ebdb0b4bc6f774d 100644
--- a/chrome/browser/extensions/page_action_browsertest.cc
+++ b/chrome/browser/extensions/page_action_browsertest.cc
@@ -9,6 +9,8 @@
#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"
@@ -106,12 +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);
- ASSERT_TRUE(WaitForPageActionCountChangeTo(1));
+ LocationBarTesting* location_bar =
+ browser()->window()->GetLocationBar()->GetLocationBarForTesting();
+ EXPECT_EQ(1, location_bar->PageActionCount());
UnloadExtension(last_loaded_extension_id());
// Make sure the page action goes away when it's unloaded.
- ASSERT_TRUE(WaitForPageActionCountChangeTo(0));
+ EXPECT_EQ(0, location_bar->PageActionCount());
}
// Tests that we can load page actions in the Omnibox.

Powered by Google App Engine
This is Rietveld 408576698