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

Unified Diff: chrome/browser/ui/views/extensions/extension_toolbar_icon_surfacing_bubble_views_unittest.cc

Issue 1455313002: [Reland][Extensions] Don't count bubble focus loss as acknowledgment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Created 5 years, 1 month 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/views/extensions/extension_toolbar_icon_surfacing_bubble_views_unittest.cc
diff --git a/chrome/browser/ui/views/extensions/extension_toolbar_icon_surfacing_bubble_views_unittest.cc b/chrome/browser/ui/views/extensions/extension_toolbar_icon_surfacing_bubble_views_unittest.cc
index ab7cbd2bf2c700071c43c402d536ccebfa0a1775..ac8a6da64f0847c8625bcf9ddd57022c0145b9fa 100644
--- a/chrome/browser/ui/views/extensions/extension_toolbar_icon_surfacing_bubble_views_unittest.cc
+++ b/chrome/browser/ui/views/extensions/extension_toolbar_icon_surfacing_bubble_views_unittest.cc
@@ -81,11 +81,12 @@ TEST_F(ExtensionToolbarIconSurfacingBubbleTest,
views::test::TestWidgetObserver bubble_observer(bubble_widget);
EXPECT_FALSE(delegate.close_action());
- // Close the bubble. The delegate should be told it was dismissed.
- bubble_widget->Close();
+ // Close the bubble by activating another widget. The delegate should be
+ // told it was dismissed.
+ anchor_widget->Activate();
base::RunLoop().RunUntilIdle();
ASSERT_TRUE(delegate.close_action());
- EXPECT_EQ(ToolbarActionsBarBubbleDelegate::CLOSE_DISMISS,
+ EXPECT_EQ(ToolbarActionsBarBubbleDelegate::CLOSE_DISMISS_DEACTIVATION,
*delegate.close_action());
EXPECT_TRUE(bubble_observer.widget_closed());
}

Powered by Google App Engine
This is Rietveld 408576698