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> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 class TestLabel : public Label { | 50 class TestLabel : public Label { |
51 public: | 51 public: |
52 TestLabel() : Label(ASCIIToUTF16("TestLabel")) { SizeToPreferredSize(); } | 52 TestLabel() : Label(ASCIIToUTF16("TestLabel")) { SizeToPreferredSize(); } |
53 | 53 |
54 int schedule_paint_count() const { return schedule_paint_count_; } | 54 int schedule_paint_count() const { return schedule_paint_count_; } |
55 | 55 |
56 void SimulatePaint() { | 56 void SimulatePaint() { |
57 SkBitmap bitmap; | 57 SkBitmap bitmap; |
58 SkColor color = SK_ColorTRANSPARENT; | 58 SkColor color = SK_ColorTRANSPARENT; |
59 Paint(ui::CanvasPainter(&bitmap, bounds().size(), 1.f, color).context()); | 59 Paint( |
| 60 PaintInfo(ui::CanvasPainter(&bitmap, bounds().size(), 1.f, color, false) |
| 61 .context(), |
| 62 bounds().size())); |
60 } | 63 } |
61 | 64 |
62 // View: | 65 // View: |
63 void SchedulePaintInRect(const gfx::Rect& r) override { | 66 void SchedulePaintInRect(const gfx::Rect& r) override { |
64 ++schedule_paint_count_; | 67 ++schedule_paint_count_; |
65 Label::SchedulePaintInRect(r); | 68 Label::SchedulePaintInRect(r); |
66 } | 69 } |
67 | 70 |
68 private: | 71 private: |
69 int schedule_paint_count_ = 0; | 72 int schedule_paint_count_ = 0; |
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1321 EXPECT_FALSE(IsMenuCommandEnabled(IDS_APP_SELECT_ALL)); | 1324 EXPECT_FALSE(IsMenuCommandEnabled(IDS_APP_SELECT_ALL)); |
1322 } | 1325 } |
1323 | 1326 |
1324 INSTANTIATE_TEST_CASE_P(, | 1327 INSTANTIATE_TEST_CASE_P(, |
1325 MDLabelTest, | 1328 MDLabelTest, |
1326 ::testing::Values(SecondaryUiMode::MD, | 1329 ::testing::Values(SecondaryUiMode::MD, |
1327 SecondaryUiMode::NON_MD), | 1330 SecondaryUiMode::NON_MD), |
1328 &SecondaryUiModeToString); | 1331 &SecondaryUiModeToString); |
1329 | 1332 |
1330 } // namespace views | 1333 } // namespace views |
OLD | NEW |