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

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

Issue 11416251: Desktop aura: Continue threading context through views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix erroneously removed line from NWWin tests. Created 8 years 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
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 e2835a7bfd0731ae1c219f0a03df6656fb237a04..a922e80429c6380976fed39cedbb171fbe27712d 100644
--- a/ui/views/bubble/bubble_frame_view_unittest.cc
+++ b/ui/views/bubble/bubble_frame_view_unittest.cc
@@ -24,7 +24,7 @@ const int kDefaultMargin = 6;
class SizedBubbleDelegateView : public BubbleDelegateView {
public:
- SizedBubbleDelegateView();
+ SizedBubbleDelegateView(View* anchor_view);
virtual ~SizedBubbleDelegateView();
// View overrides:
@@ -34,7 +34,9 @@ class SizedBubbleDelegateView : public BubbleDelegateView {
DISALLOW_COPY_AND_ASSIGN(SizedBubbleDelegateView);
};
-SizedBubbleDelegateView::SizedBubbleDelegateView() {}
+SizedBubbleDelegateView::SizedBubbleDelegateView(View* anchor_view)
+ : BubbleDelegateView(anchor_view, BubbleBorder::TOP_LEFT) {
+}
SizedBubbleDelegateView::~SizedBubbleDelegateView() {}
@@ -87,7 +89,14 @@ TEST_F(BubbleFrameViewTest, GetBoundsForClientView) {
}
TEST_F(BubbleFrameViewTest, NonClientHitTest) {
- BubbleDelegateView* delegate = new SizedBubbleDelegateView();
+ // Create the anchor and parent widgets.
+ Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_WINDOW);
+ scoped_ptr<Widget> anchor_widget(new Widget);
+ anchor_widget->Init(params);
+ anchor_widget->Show();
+
+ BubbleDelegateView* delegate =
+ new SizedBubbleDelegateView(anchor_widget->GetContentsView());
Widget* widget(BubbleDelegateView::CreateBubble(delegate));
delegate->Show();
gfx::Point kPtInBound(100, 100);
« no previous file with comments | « ui/views/bubble/bubble_delegate_unittest.cc ('k') | ui/views/controls/combobox/native_combobox_views_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698