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/gfx/text_utils.h" | 5 #include "ui/gfx/text_utils.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 9 #include "base/macros.h" |
7 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 11 #include "build/build_config.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
9 #include "ui/gfx/font_list.h" | 13 #include "ui/gfx/font_list.h" |
10 | 14 |
11 namespace gfx { | 15 namespace gfx { |
12 namespace { | 16 namespace { |
13 | 17 |
14 const base::char16 kAcceleratorChar = '&'; | 18 const base::char16 kAcceleratorChar = '&'; |
15 | 19 |
16 TEST(TextUtilsTest, RemoveAcceleratorChar) { | 20 TEST(TextUtilsTest, RemoveAcceleratorChar) { |
17 struct TestData { | 21 struct TestData { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 EXPECT_GT(GetStringWidth(base::ASCIIToUTF16("a"), font_list), | 76 EXPECT_GT(GetStringWidth(base::ASCIIToUTF16("a"), font_list), |
73 GetStringWidth(base::string16(), font_list)); | 77 GetStringWidth(base::string16(), font_list)); |
74 EXPECT_GT(GetStringWidth(base::ASCIIToUTF16("ab"), font_list), | 78 EXPECT_GT(GetStringWidth(base::ASCIIToUTF16("ab"), font_list), |
75 GetStringWidth(base::ASCIIToUTF16("a"), font_list)); | 79 GetStringWidth(base::ASCIIToUTF16("a"), font_list)); |
76 EXPECT_GT(GetStringWidth(base::ASCIIToUTF16("abc"), font_list), | 80 EXPECT_GT(GetStringWidth(base::ASCIIToUTF16("abc"), font_list), |
77 GetStringWidth(base::ASCIIToUTF16("ab"), font_list)); | 81 GetStringWidth(base::ASCIIToUTF16("ab"), font_list)); |
78 } | 82 } |
79 | 83 |
80 } // namespace | 84 } // namespace |
81 } // namespace gfx | 85 } // namespace gfx |
OLD | NEW |