OLD | NEW |
1 // Copyright (c) 2012 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/views/bubble/bubble_border.h" | 5 #include "ui/views/bubble/bubble_border.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
| 9 #include <memory> |
| 10 |
9 #include "base/macros.h" | 11 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "base/strings/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
12 #include "ui/gfx/canvas.h" | 13 #include "ui/gfx/canvas.h" |
13 #include "ui/gfx/geometry/rect.h" | 14 #include "ui/gfx/geometry/rect.h" |
14 #include "ui/views/test/views_test_base.h" | 15 #include "ui/views/test/views_test_base.h" |
15 | 16 |
16 namespace views { | 17 namespace views { |
17 | 18 |
18 typedef views::ViewsTestBase BubbleBorderTest; | 19 typedef views::ViewsTestBase BubbleBorderTest; |
19 | 20 |
20 TEST_F(BubbleBorderTest, GetMirroredArrow) { | 21 TEST_F(BubbleBorderTest, GetMirroredArrow) { |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 EXPECT_GE(border_images->border_thickness, | 477 EXPECT_GE(border_images->border_thickness, |
477 border_images->border_interior_thickness); | 478 border_images->border_interior_thickness); |
478 | 479 |
479 // For a TOP_LEFT arrow, the x-offset always matches the border thickness. | 480 // For a TOP_LEFT arrow, the x-offset always matches the border thickness. |
480 EXPECT_EQ(border.GetArrowRect(rect).x(), border_images->border_thickness); | 481 EXPECT_EQ(border.GetArrowRect(rect).x(), border_images->border_thickness); |
481 border.Paint(paint_view, &canvas); | 482 border.Paint(paint_view, &canvas); |
482 } | 483 } |
483 } | 484 } |
484 | 485 |
485 } // namespace views | 486 } // namespace views |
OLD | NEW |