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/controls/label.h" | 5 #include "ui/views/controls/label.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
8 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 11 #include "build/build_config.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "ui/accessibility/ax_view_state.h" | 13 #include "ui/accessibility/ax_view_state.h" |
11 #include "ui/base/l10n/l10n_util.h" | 14 #include "ui/base/l10n/l10n_util.h" |
12 #include "ui/compositor/canvas_painter.h" | 15 #include "ui/compositor/canvas_painter.h" |
13 #include "ui/gfx/canvas.h" | 16 #include "ui/gfx/canvas.h" |
14 #include "ui/views/border.h" | 17 #include "ui/views/border.h" |
15 #include "ui/views/test/focus_manager_test.h" | 18 #include "ui/views/test/focus_manager_test.h" |
16 #include "ui/views/test/views_test_base.h" | 19 #include "ui/views/test/views_test_base.h" |
17 #include "ui/views/widget/widget.h" | 20 #include "ui/views/widget/widget.h" |
18 | 21 |
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 label()->SetFocusable(true); | 651 label()->SetFocusable(true); |
649 label()->RequestFocus(); | 652 label()->RequestFocus(); |
650 label()->SizeToPreferredSize(); | 653 label()->SizeToPreferredSize(); |
651 | 654 |
652 gfx::Rect focus_bounds = label()->GetFocusBounds(); | 655 gfx::Rect focus_bounds = label()->GetFocusBounds(); |
653 EXPECT_FALSE(focus_bounds.IsEmpty()); | 656 EXPECT_FALSE(focus_bounds.IsEmpty()); |
654 EXPECT_LT(label()->font_list().GetHeight(), focus_bounds.height()); | 657 EXPECT_LT(label()->font_list().GetHeight(), focus_bounds.height()); |
655 } | 658 } |
656 | 659 |
657 } // namespace views | 660 } // namespace views |
OLD | NEW |