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

Side by Side Diff: ui/views/bubble/bubble_frame_view_unittest.cc

Issue 10358013: views: Mark single-argument constructors as explicit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/border.cc ('k') | ui/views/controls/button/text_button.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/base/hit_test.h" 5 #include "ui/base/hit_test.h"
6 #include "ui/views/bubble/bubble_border.h" 6 #include "ui/views/bubble/bubble_border.h"
7 #include "ui/views/bubble/bubble_delegate.h" 7 #include "ui/views/bubble/bubble_delegate.h"
8 #include "ui/views/bubble/bubble_frame_view.h" 8 #include "ui/views/bubble/bubble_frame_view.h"
9 #include "ui/views/test/views_test_base.h" 9 #include "ui/views/test/views_test_base.h"
10 #include "ui/views/widget/widget.h" 10 #include "ui/views/widget/widget.h"
11 11
(...skipping 21 matching lines...) Expand all
33 }; 33 };
34 34
35 SizedBubbleDelegateView::SizedBubbleDelegateView() {} 35 SizedBubbleDelegateView::SizedBubbleDelegateView() {}
36 36
37 SizedBubbleDelegateView::~SizedBubbleDelegateView() {} 37 SizedBubbleDelegateView::~SizedBubbleDelegateView() {}
38 38
39 gfx::Size SizedBubbleDelegateView::GetPreferredSize() { return kRect.size(); } 39 gfx::Size SizedBubbleDelegateView::GetPreferredSize() { return kRect.size(); }
40 40
41 class TestBubbleFrameView : public BubbleFrameView { 41 class TestBubbleFrameView : public BubbleFrameView {
42 public: 42 public:
43 TestBubbleFrameView(const gfx::Rect& bounds); 43 explicit TestBubbleFrameView(const gfx::Rect& bounds);
44 virtual ~TestBubbleFrameView(); 44 virtual ~TestBubbleFrameView();
45 45
46 protected: 46 protected:
47 virtual gfx::Rect GetMonitorBounds(const gfx::Rect& rect) OVERRIDE; 47 virtual gfx::Rect GetMonitorBounds(const gfx::Rect& rect) OVERRIDE;
48 48
49 private: 49 private:
50 gfx::Rect monitor_bounds_; 50 gfx::Rect monitor_bounds_;
51 51
52 DISALLOW_COPY_AND_ASSIGN(TestBubbleFrameView); 52 DISALLOW_COPY_AND_ASSIGN(TestBubbleFrameView);
53 }; 53 };
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 gfx::Size(500, 500), // |client_size| 224 gfx::Size(500, 500), // |client_size|
225 false); // |try_mirroring_arrow| 225 false); // |try_mirroring_arrow|
226 EXPECT_EQ(BubbleBorder::TOP_RIGHT, frame.bubble_border()->arrow_location()); 226 EXPECT_EQ(BubbleBorder::TOP_RIGHT, frame.bubble_border()->arrow_location());
227 // The coordinates should be pointing to anchor_rect from TOP_RIGHT. 227 // The coordinates should be pointing to anchor_rect from TOP_RIGHT.
228 EXPECT_LT(window_bounds.x(), 100 + 50 - 500); 228 EXPECT_LT(window_bounds.x(), 100 + 50 - 500);
229 EXPECT_GT(window_bounds.y(), 900 + 50 - 10); // -10 to roughly compensate for 229 EXPECT_GT(window_bounds.y(), 900 + 50 - 10); // -10 to roughly compensate for
230 // arrow overlap. 230 // arrow overlap.
231 } 231 }
232 232
233 } // namespace views 233 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/border.cc ('k') | ui/views/controls/button/text_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698