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

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

Issue 10808066: Fix position of web notification bubble and arrow (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: . Created 8 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
« ui/views/bubble/bubble_delegate.cc ('K') | « 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 d4f5e0536532401b405678a8bf5d4d8878ecbd17..15b40791132355dbd1a73edc4094336e0a1f4806 100644
--- a/ui/views/bubble/bubble_frame_view_unittest.cc
+++ b/ui/views/bubble/bubble_frame_view_unittest.cc
@@ -57,12 +57,15 @@ class TestBubbleFrameView : public BubbleFrameView {
};
TestBubbleFrameView::TestBubbleFrameView(const gfx::Rect& bounds)
- : BubbleFrameView(kArrow, kBackgroundColor,
- gfx::Insets(kDefaultMargin,
- kDefaultMargin,
- kDefaultMargin,
- kDefaultMargin)),
+ : BubbleFrameView(gfx::Insets(kDefaultMargin,
+ kDefaultMargin,
+ kDefaultMargin,
+ kDefaultMargin)),
monitor_bounds_(bounds) {
+ BubbleBorder* bubble_border =
+ new BubbleBorder(kArrow, BubbleBorder::NO_SHADOW);
+ bubble_border->set_background_color(kBackgroundColor);
+ SetBubbleBorder(bubble_border);
}
TestBubbleFrameView::~TestBubbleFrameView() {}
@@ -74,11 +77,7 @@ gfx::Rect TestBubbleFrameView::GetMonitorBounds(const gfx::Rect& rect) {
} // namespace
TEST_F(BubbleFrameViewTest, GetBoundsForClientView) {
- BubbleFrameView frame(
- kArrow,
- kBackgroundColor,
- gfx::Insets(kDefaultMargin, kDefaultMargin, kDefaultMargin,
- kDefaultMargin));
+ TestBubbleFrameView frame(gfx::Rect(0, 0, 1000, 1000));
msw 2012/07/23 22:20:49 Why change the margins from kDefaultMargin?
stevenjb 2012/07/23 23:32:06 TestBubbleFrameView sets the insets using kDefault
msw 2012/07/24 00:32:44 Ah, you're right, thanks.
EXPECT_EQ(kArrow, frame.bubble_border()->arrow_location());
EXPECT_EQ(kBackgroundColor, frame.bubble_border()->background_color());
« ui/views/bubble/bubble_delegate.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