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 "content/common/mac/font_descriptor.h" | 5 #include "content/common/mac/font_descriptor.h" |
6 | 6 |
7 #include <Cocoa/Cocoa.h> | 7 #include <Cocoa/Cocoa.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/utf_string_conversions.h" | |
11 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
| 11 #include "base/strings/utf_string_conversions.h" |
12 #include "testing/gtest_mac.h" | 12 #include "testing/gtest_mac.h" |
13 #include "testing/platform_test.h" | 13 #include "testing/platform_test.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 class FontSerializationTest : public PlatformTest {}; | 17 class FontSerializationTest : public PlatformTest {}; |
18 | 18 |
19 const std::string kCourierFontName("Courier"); | 19 const std::string kCourierFontName("Courier"); |
20 | 20 |
21 // Compare 2 fonts, make sure they point at the same font definition and have | 21 // Compare 2 fonts, make sure they point at the same font definition and have |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 TEST_F(FontSerializationTest, BadParameters) { | 105 TEST_F(FontSerializationTest, BadParameters) { |
106 EXPECT_NSNE(MakeNSFont(kCourierFontName, 12), nil); | 106 EXPECT_NSNE(MakeNSFont(kCourierFontName, 12), nil); |
107 EXPECT_NSNE(MakeNSFont(kCourierFontName, std::numeric_limits<float>::min()), | 107 EXPECT_NSNE(MakeNSFont(kCourierFontName, std::numeric_limits<float>::min()), |
108 nil); | 108 nil); |
109 EXPECT_NSNE(MakeNSFont(kCourierFontName, 0), nil); | 109 EXPECT_NSNE(MakeNSFont(kCourierFontName, 0), nil); |
110 EXPECT_NSNE(MakeNSFont(kCourierFontName, std::numeric_limits<float>::max()), | 110 EXPECT_NSNE(MakeNSFont(kCourierFontName, std::numeric_limits<float>::max()), |
111 nil); | 111 nil); |
112 } | 112 } |
113 | 113 |
114 } // namespace | 114 } // namespace |
OLD | NEW |