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

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

Issue 2177533002: Revert of BubbleFrameView: add top padding even when close button is hidden (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « ui/views/bubble/bubble_frame_view.cc ('k') | no next file » | 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 c8d4ebf8ca0daa789b6cc686ff18e72cfc3a9ef3..9e338c563d8b20b58956405fa41e23649480f43c 100644
--- a/ui/views/bubble/bubble_frame_view_unittest.cc
+++ b/ui/views/bubble/bubble_frame_view_unittest.cc
@@ -12,7 +12,6 @@
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
#include "ui/views/bubble/bubble_border.h"
-#include "ui/views/controls/button/image_button.h"
#include "ui/views/test/test_views.h"
#include "ui/views/test/views_test_base.h"
#include "ui/views/widget/widget.h"
@@ -37,8 +36,7 @@
// 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;
-// 12 for the builtin margin, 14 for the close button margin
-const int kExpectedAdditionalHeight = 12 + 14;
+const int kExpectedAdditionalHeight = 12;
class TestBubbleFrameViewWidgetDelegate : public WidgetDelegate {
public:
@@ -121,11 +119,9 @@
int margin_x = frame.content_margins().left();
int margin_y = frame.content_margins().top();
- int close_y = 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 + close_y,
- frame.GetBoundsForClientView().y());
+ EXPECT_EQ(insets.top() + margin_y, frame.GetBoundsForClientView().y());
}
// Tests that the arrow is mirrored as needed to better fit the screen.
@@ -441,9 +437,6 @@
// Expect that a border has been added to the minimum size.
minimum_rect.Inset(frame.bubble_border()->GetInsets());
- ImageButton* button = frame.GetCloseButtonForTest();
- EXPECT_EQ(button->height(), 14);
- EXPECT_EQ(nullptr, frame.GetCloseButtonForTest()->border());
gfx::Size expected_size(kMinimumClientWidth + kExpectedAdditionalWidth,
kMinimumClientHeight + kExpectedAdditionalHeight);
EXPECT_EQ(expected_size, minimum_rect.size());
« no previous file with comments | « 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