OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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 "platform/fonts/shaping/CachingWordShaper.h" | 5 #include "platform/fonts/shaping/CachingWordShaper.h" |
6 | 6 |
| 7 #include <memory> |
7 #include "platform/fonts/CharacterRange.h" | 8 #include "platform/fonts/CharacterRange.h" |
8 #include "platform/fonts/FontCache.h" | 9 #include "platform/fonts/FontCache.h" |
9 #include "platform/fonts/shaping/CachingWordShapeIterator.h" | 10 #include "platform/fonts/shaping/CachingWordShapeIterator.h" |
10 #include "platform/fonts/shaping/ShapeResultTestInfo.h" | 11 #include "platform/fonts/shaping/ShapeResultTestInfo.h" |
| 12 #include "platform/wtf/PtrUtil.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
12 #include "wtf/PtrUtil.h" | |
13 #include <memory> | |
14 | 14 |
15 namespace blink { | 15 namespace blink { |
16 | 16 |
17 class CachingWordShaperTest : public ::testing::Test { | 17 class CachingWordShaperTest : public ::testing::Test { |
18 protected: | 18 protected: |
19 void SetUp() override { | 19 void SetUp() override { |
20 fontDescription.setComputedSize(12.0); | 20 fontDescription.setComputedSize(12.0); |
21 fontDescription.setLocale(LayoutLocale::get("en")); | 21 fontDescription.setLocale(LayoutLocale::get("en")); |
22 ASSERT_EQ(USCRIPT_LATIN, fontDescription.script()); | 22 ASSERT_EQ(USCRIPT_LATIN, fontDescription.script()); |
23 fontDescription.setGenericFamily(FontDescription::StandardFamily); | 23 fontDescription.setGenericFamily(FontDescription::StandardFamily); |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 // The total width of periods and spaces should be longer than the width of | 479 // The total width of periods and spaces should be longer than the width of |
480 // periods alone. | 480 // periods alone. |
481 ASSERT_GT(periodsAndSpacesWidth, periodsWidth); | 481 ASSERT_GT(periodsAndSpacesWidth, periodsWidth); |
482 | 482 |
483 // The glyph bounds of periods and spaces should be longer than the glyph | 483 // The glyph bounds of periods and spaces should be longer than the glyph |
484 // bounds of periods alone. | 484 // bounds of periods alone. |
485 ASSERT_GT(periodsAndSpacesGlyphBounds.width(), periodsGlyphBounds.width()); | 485 ASSERT_GT(periodsAndSpacesGlyphBounds.width(), periodsGlyphBounds.width()); |
486 } | 486 } |
487 | 487 |
488 } // namespace blink | 488 } // namespace blink |
OLD | NEW |