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

Unified Diff: chrome/browser/ui/chrome_bubble_manager_unittest.cc

Issue 2451573004: Not close bubble if the navigation is in-page (Closed)
Patch Set: address comment Created 4 years, 2 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/ui/chrome_bubble_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/chrome_bubble_manager_unittest.cc
diff --git a/chrome/browser/ui/chrome_bubble_manager_unittest.cc b/chrome/browser/ui/chrome_bubble_manager_unittest.cc
index 7848085053953fe5926ec43051ae95d2d92ce073..3655c37b98218fe7eeb699ebd855315594ac46ce 100644
--- a/chrome/browser/ui/chrome_bubble_manager_unittest.cc
+++ b/chrome/browser/ui/chrome_bubble_manager_unittest.cc
@@ -73,6 +73,18 @@ TEST_F(ChromeBubbleManagerTest, CloseMockBubbleOnNavigate) {
ASSERT_FALSE(bubble_ref);
}
+TEST_F(ChromeBubbleManagerTest, DontCloseBubbleWhenNavigationIsInPage) {
+ AddTab(browser(), GURL("https://foo/0"));
+
+ std::unique_ptr<MockBubbleDelegate> delegate(new MockBubbleDelegate);
+ BubbleReference bubble_ref = manager_->ShowBubble(std::move(delegate));
+
+ NavigateAndCommitActiveTab(GURL("https://foo/0#0"));
+
+ ASSERT_TRUE(bubble_ref)
+ << "The bubble shouldn't be destroyed when it is an in-page navigation.";
+}
+
TEST_F(ChromeBubbleManagerTest, CloseMockBubbleOnOwningFrameDestroy) {
AddTab(browser(), GURL("https://foo/0"));
« no previous file with comments | « chrome/browser/ui/chrome_bubble_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698