| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/border_contents_view.h" |
| 7 #include "ui/views/bubble/bubble_border.h" |
| 8 #include "ui/views/bubble/bubble_delegate.h" |
| 9 #include "ui/views/bubble/bubble_frame_view.h" |
| 6 #include "ui/views/test/views_test_base.h" | 10 #include "ui/views/test/views_test_base.h" |
| 7 #include "views/bubble/border_contents_view.h" | |
| 8 #include "views/bubble/bubble_border.h" | |
| 9 #include "views/bubble/bubble_delegate.h" | |
| 10 #include "views/bubble/bubble_frame_view.h" | |
| 11 #include "views/widget/widget.h" | 11 #include "views/widget/widget.h" |
| 12 | 12 |
| 13 namespace views { | 13 namespace views { |
| 14 | 14 |
| 15 typedef ViewsTestBase BubbleFrameViewBasicTest; | 15 typedef ViewsTestBase BubbleFrameViewBasicTest; |
| 16 | 16 |
| 17 const BubbleBorder::ArrowLocation kArrow = BubbleBorder::TOP_LEFT; | 17 const BubbleBorder::ArrowLocation kArrow = BubbleBorder::TOP_LEFT; |
| 18 const gfx::Rect kRect(10, 10, 200, 200); | 18 const gfx::Rect kRect(10, 10, 200, 200); |
| 19 const SkColor kBackgroundColor = SK_ColorRED; | 19 const SkColor kBackgroundColor = SK_ColorRED; |
| 20 const bool kAllowBubbleOffscreen = true; | 20 const bool kAllowBubbleOffscreen = true; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 gfx::Point kPtInBound(100, 100); | 59 gfx::Point kPtInBound(100, 100); |
| 60 gfx::Point kPtOutsideBound(1000, 1000); | 60 gfx::Point kPtOutsideBound(1000, 1000); |
| 61 BubbleFrameView* bubble_frame_view = delegate->GetBubbleFrameView(); | 61 BubbleFrameView* bubble_frame_view = delegate->GetBubbleFrameView(); |
| 62 EXPECT_EQ(HTCLIENT, bubble_frame_view->NonClientHitTest(kPtInBound)); | 62 EXPECT_EQ(HTCLIENT, bubble_frame_view->NonClientHitTest(kPtInBound)); |
| 63 EXPECT_EQ(HTNOWHERE, bubble_frame_view->NonClientHitTest(kPtOutsideBound)); | 63 EXPECT_EQ(HTNOWHERE, bubble_frame_view->NonClientHitTest(kPtOutsideBound)); |
| 64 widget->CloseNow(); | 64 widget->CloseNow(); |
| 65 RunPendingMessages(); | 65 RunPendingMessages(); |
| 66 } | 66 } |
| 67 | 67 |
| 68 } // namespace views | 68 } // namespace views |
| OLD | NEW |