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

Unified Diff: ui/views/bubble/bubble_frame_view_unittest.cc

Issue 2955963002: Update Chrome Upstream flow to reflect new UI mocks (Closed)
Patch Set: Actioning first round of tapted/msw code review comments Created 3 years, 5 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: 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 dda52edc8549fa7c161bff9ae03cf6297ea32f42..5108643115054016a87d281fc89d9a8edbcf7fa1 100644
--- a/ui/views/bubble/bubble_frame_view_unittest.cc
+++ b/ui/views/bubble/bubble_frame_view_unittest.cc
@@ -142,7 +142,7 @@ TEST_F(BubbleFrameViewTest, RemoveFootnoteView) {
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_);
+ EXPECT_EQ(footnote_dummy_view->parent(), (View*)frame.footnote_container_);
msw 2017/07/05 20:45:30 nit: this cast shouldn't be needed or should use s
Jared Saul 2017/07/07 20:12:28 Yep; it's good now that I reverted it to a View*,
View* container_view = footnote_dummy_view->parent();
delete footnote_dummy_view;
footnote_dummy_view = nullptr;
@@ -168,6 +168,21 @@ TEST_F(BubbleFrameViewTest, GetBoundsForClientViewWithClose) {
frame.GetBoundsForClientView().y());
}
+TEST_F(BubbleFrameViewTest,
+ FootnoteContainerViewShouldMatchVisibilityOfFirstChild) {
+ TestBubbleFrameView frame(this);
+ View* footnote_dummy_view = new StaticSizedView(gfx::Size(200, 200));
+ footnote_dummy_view->SetVisible(false);
+ frame.SetFootnoteView(footnote_dummy_view);
+ View* footnote_container_view = (View*)frame.footnote_container_;
msw 2017/07/05 20:45:30 nit: this cast shouldn't be needed or should use s
Jared Saul 2017/07/07 20:12:28 Done.
+ EXPECT_EQ(footnote_dummy_view->parent(), footnote_container_view);
msw 2017/07/05 20:45:30 Please just retrieve the footnote's container via
Jared Saul 2017/07/07 20:12:28 Done; thank you for the detailed instructions!
+ EXPECT_FALSE(footnote_container_view->visible());
+ footnote_dummy_view->SetVisible(true);
+ EXPECT_TRUE(footnote_container_view->visible());
+ footnote_dummy_view->SetVisible(false);
+ EXPECT_FALSE(footnote_container_view->visible());
+}
tapted 2017/07/06 01:11:59 the visibility test is good.. I think I see the
+
// Tests that the arrow is mirrored as needed to better fit the screen.
TEST_F(BubbleFrameViewTest, GetUpdatedWindowBounds) {
TestBubbleFrameView frame(this);
« ui/views/bubble/bubble_frame_view.cc ('K') | « ui/views/bubble/bubble_frame_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698