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 "base/macros.h" |
| 6 #include "testing/gtest/include/gtest/gtest.h" |
5 #include "ui/gfx/font_fallback_win.h" | 7 #include "ui/gfx/font_fallback_win.h" |
6 #include "testing/gtest/include/gtest/gtest.h" | |
7 | 8 |
8 namespace gfx { | 9 namespace gfx { |
9 | 10 |
10 namespace { | 11 namespace { |
11 | 12 |
12 // Subclass of LinkedFontsIterator for testing that allows mocking the linked | 13 // Subclass of LinkedFontsIterator for testing that allows mocking the linked |
13 // fonts vector. | 14 // fonts vector. |
14 class TestLinkedFontsIterator : public internal::LinkedFontsIterator { | 15 class TestLinkedFontsIterator : public internal::LinkedFontsIterator { |
15 public: | 16 public: |
16 explicit TestLinkedFontsIterator(Font font) : LinkedFontsIterator(font) { | 17 explicit TestLinkedFontsIterator(Font font) : LinkedFontsIterator(font) { |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 EXPECT_TRUE(iterator.NextFont(&font)); | 108 EXPECT_TRUE(iterator.NextFont(&font)); |
108 ASSERT_EQ("Tahoma", font.GetFontName()); | 109 ASSERT_EQ("Tahoma", font.GetFontName()); |
109 | 110 |
110 EXPECT_TRUE(iterator.NextFont(&font)); | 111 EXPECT_TRUE(iterator.NextFont(&font)); |
111 ASSERT_EQ("Times New Roman", font.GetFontName()); | 112 ASSERT_EQ("Times New Roman", font.GetFontName()); |
112 | 113 |
113 EXPECT_FALSE(iterator.NextFont(&font)); | 114 EXPECT_FALSE(iterator.NextFont(&font)); |
114 } | 115 } |
115 | 116 |
116 } // namespace gfx | 117 } // namespace gfx |
OLD | NEW |