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

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

Issue 2821463004: Revert of Fix layout of BubbleFrameView when there's only a close button in the (Closed)
Patch Set: Created 3 years, 8 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 | « ui/views/bubble/bubble_frame_view.cc ('k') | ui/views/window/dialog_delegate_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3474899d99a83b9c15b20173e5287c20bade7266..bf955dd451c640273688efb5f36fae2e0198a691 100644
--- a/ui/views/bubble/bubble_frame_view_unittest.cc
+++ b/ui/views/bubble/bubble_frame_view_unittest.cc
@@ -145,12 +145,12 @@
EXPECT_EQ(kArrow, frame.bubble_border()->arrow());
EXPECT_EQ(kColor, frame.bubble_border()->background_color());
- gfx::Insets frame_insets = frame.GetInsets();
- gfx::Insets border_insets = frame.bubble_border()->GetInsets();
- EXPECT_EQ(border_insets.left() + frame_insets.left(),
- frame.GetBoundsForClientView().x());
- EXPECT_EQ(border_insets.top() + frame_insets.top(),
- frame.GetBoundsForClientView().y());
+ int margin_x = frame.content_margins().left();
+ int margin_y = frame.content_margins().top() +
+ frame.GetCloseButtonForTest()->height();
+ gfx::Insets insets = frame.bubble_border()->GetInsets();
+ EXPECT_EQ(insets.left() + margin_x, frame.GetBoundsForClientView().x());
+ EXPECT_EQ(insets.top() + margin_y, frame.GetBoundsForClientView().y());
}
// Tests that the arrow is mirrored as needed to better fit the screen.
« no previous file with comments | « ui/views/bubble/bubble_frame_view.cc ('k') | ui/views/window/dialog_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698