Index: ui/views/bubble/bubble_frame_view_unittest.cc |
diff --git a/ui/views/bubble/bubble_frame_view_unittest.cc b/ui/views/bubble/bubble_frame_view_unittest.cc |
index 463760c059ef9bcc6fdc3354b3c45a2975ee706c..5ffb1b2f6bb8a9ae170eb33218dd7e0fca0a034e 100644 |
--- a/ui/views/bubble/bubble_frame_view_unittest.cc |
+++ b/ui/views/bubble/bubble_frame_view_unittest.cc |
@@ -137,6 +137,19 @@ TEST_F(BubbleFrameViewTest, GetBoundsForClientView) { |
EXPECT_EQ(insets.top() + margin_y, frame.GetBoundsForClientView().y()); |
} |
+TEST_F(BubbleFrameViewTest, RemoveFootnoteView) { |
+ TestBubbleFrameView frame(this); |
+ EXPECT_EQ(nullptr, frame.footnote_container_); |
+ View* footnote_dummy_view = new StaticSizedView(gfx::Size(200, 200)); |
+ frame.SetFootnoteView(footnote_dummy_view); |
+ EXPECT_EQ(footnote_dummy_view->parent(), frame.footnote_container_); |
+ View* container_view = footnote_dummy_view->parent(); |
+ delete footnote_dummy_view; |
+ footnote_dummy_view = nullptr; |
+ EXPECT_FALSE(container_view->visible()); |
+ EXPECT_EQ(nullptr, frame.footnote_container_); |
+} |
+ |
TEST_F(BubbleFrameViewTest, GetBoundsForClientViewWithClose) { |
TestBubbleFrameView frame(this); |
// TestBubbleFrameView::GetWidget() is responsible for creating the widget and |