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

Unified Diff: chrome/browser/ui/toolbar/browser_actions_bar_browsertest.cc

Issue 1659993002: [Extensions UI Mac] Fix race condition in showing the icon surfacing bubble (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2623
Patch Set: Created 4 years, 11 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/ui/toolbar/browser_actions_bar_browsertest.cc
diff --git a/chrome/browser/ui/toolbar/browser_actions_bar_browsertest.cc b/chrome/browser/ui/toolbar/browser_actions_bar_browsertest.cc
index e2d042cad77a63518c89ccaa4b0fbd5989b03c71..783891d4600d1acd662bf8c6fd247426c0fe1221 100644
--- a/chrome/browser/ui/toolbar/browser_actions_bar_browsertest.cc
+++ b/chrome/browser/ui/toolbar/browser_actions_bar_browsertest.cc
@@ -7,6 +7,7 @@
#include <stddef.h>
#include "base/macros.h"
+#include "base/prefs/pref_service.h"
#include "base/run_loop.h"
#include "chrome/browser/extensions/api/extension_action/extension_action_api.h"
#include "chrome/browser/extensions/browser_action_test_util.h"
@@ -21,6 +22,7 @@
#include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h"
#include "chrome/browser/ui/toolbar/toolbar_actions_bar.h"
#include "chrome/browser/ui/toolbar/toolbar_actions_model.h"
+#include "chrome/common/pref_names.h"
#include "components/crx_file/id_util.h"
#include "content/public/browser/notification_service.h"
#include "content/public/test/test_utils.h"
@@ -506,3 +508,22 @@ IN_PROC_BROWSER_TEST_F(BrowserActionsBarRedesignBrowserTest,
content::RunAllBlockingPoolTasksUntilIdle();
EXPECT_FALSE(browser_actions_bar()->HasPopup());
}
+
+// Tests that the browser actions container correctly highlights for displaying
+// the icon surfacing bubble.
+IN_PROC_BROWSER_TEST_F(BrowserActionsBarRedesignBrowserTest,
+ PRE_HighlightsForExtensionIconSurfacingBubble) {
+ // Add a new extension and clear the pref for the bubble being acknowledged.
+ base::FilePath path = PackExtension(test_data_dir_.AppendASCII("api_test")
+ .AppendASCII("page_action")
+ .AppendASCII("simple"));
+ InstallExtensionFromWebstore(path, 1);
+ profile()->GetPrefs()->ClearPref(
+ prefs::kToolbarIconSurfacingBubbleAcknowledged);
+}
+
+IN_PROC_BROWSER_TEST_F(BrowserActionsBarRedesignBrowserTest,
+ HighlightsForExtensionIconSurfacingBubble) {
+ // The toolbar should be highlighting for the bubble.
+ EXPECT_TRUE(browser_actions_bar()->IsHighlightingForSurfacingBubble());
+}

Powered by Google App Engine
This is Rietveld 408576698