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

Side by Side Diff: ui/message_center/views/bounded_label_unittest.cc

Issue 1878943002: Revert of Makes MaterialDesignController initialization explicit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/message_center/views/bounded_label.h" 5 #include "ui/message_center/views/bounded_label.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "ui/gfx/font_list.h" 12 #include "ui/gfx/font_list.h"
13 #include "ui/gfx/text_utils.h" 13 #include "ui/gfx/text_utils.h"
14 #include "ui/views/controls/label.h" 14 #include "ui/views/controls/label.h"
15 #include "ui/views/test/views_test_base.h"
16 15
17 namespace message_center { 16 namespace message_center {
18 17
19 namespace test { 18 namespace test {
20 19
21 /* Test fixture ***************************************************************/ 20 /* Test fixture ***************************************************************/
22 21
23 class BoundedLabelTest : public views::ViewsTestBase { 22 class BoundedLabelTest : public testing::Test {
24 public: 23 public:
25 BoundedLabelTest() { 24 BoundedLabelTest() {
26 digit_pixels_ = gfx::GetStringWidth(base::UTF8ToUTF16("0"), font_list_); 25 digit_pixels_ = gfx::GetStringWidth(base::UTF8ToUTF16("0"), font_list_);
27 space_pixels_ = gfx::GetStringWidth(base::UTF8ToUTF16(" "), font_list_); 26 space_pixels_ = gfx::GetStringWidth(base::UTF8ToUTF16(" "), font_list_);
28 ellipsis_pixels_ = gfx::GetStringWidth(base::UTF8ToUTF16("\xE2\x80\xA6"), 27 ellipsis_pixels_ = gfx::GetStringWidth(base::UTF8ToUTF16("\xE2\x80\xA6"),
29 font_list_); 28 font_list_);
30 } 29 }
31 30
32 ~BoundedLabelTest() override {} 31 ~BoundedLabelTest() override {}
33 32
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 209
211 // TODO(dharcourt): Add test cases to verify that: 210 // TODO(dharcourt): Add test cases to verify that:
212 // - SetMaxLines() affects the return values of some methods but not others. 211 // - SetMaxLines() affects the return values of some methods but not others.
213 // - Bound changes affects GetPreferredLines(), GetTextSize(), and 212 // - Bound changes affects GetPreferredLines(), GetTextSize(), and
214 // GetWrappedText() return values. 213 // GetWrappedText() return values.
215 // - GetTextFlags are as expected. 214 // - GetTextFlags are as expected.
216 215
217 } // namespace test 216 } // namespace test
218 217
219 } // namespace message_center 218 } // namespace message_center
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698