| 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 9e338c563d8b20b58956405fa41e23649480f43c..5b058fa06e1fc591d14be62eab5d226666dd6dee 100644
|
| --- a/ui/views/bubble/bubble_frame_view_unittest.cc
|
| +++ b/ui/views/bubble/bubble_frame_view_unittest.cc
|
| @@ -36,7 +36,15 @@ const int kPreferredClientHeight = 250;
|
| // These account for non-client areas like the title bar, footnote etc. However
|
| // these do not take the bubble border into consideration.
|
| const int kExpectedAdditionalWidth = 12;
|
| +#if defined(OS_MACOSX)
|
| +// On Mac, since the close button is never visible, dialogs get an extra top
|
| +// inset equal to the normal height of the close button, but this is considered
|
| +// part of the inset, while it isn't on other platforms, so on Mac we have to
|
| +// expect more additional height. Blech.
|
| +const int kExpectedAdditionalHeight = 12 + 16;
|
| +#else
|
| const int kExpectedAdditionalHeight = 12;
|
| +#endif
|
|
|
| class TestBubbleFrameViewWidgetDelegate : public WidgetDelegate {
|
| public:
|
| @@ -120,6 +128,11 @@ TEST_F(BubbleFrameViewTest, GetBoundsForClientView) {
|
| int margin_x = frame.content_margins().left();
|
| int margin_y = frame.content_margins().top();
|
| gfx::Insets insets = frame.bubble_border()->GetInsets();
|
| +#if defined(OS_MACOSX)
|
| + // The insets are larger on Mac, to make up for the padding the close button
|
| + // would normally supply.
|
| + insets += gfx::Insets(16, 0, 0, 0);
|
| +#endif
|
| EXPECT_EQ(insets.left() + margin_x, frame.GetBoundsForClientView().x());
|
| EXPECT_EQ(insets.top() + margin_y, frame.GetBoundsForClientView().y());
|
| }
|
|
|