OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/opentype/FontSettings.h" | 5 #include "platform/fonts/opentype/FontSettings.h" |
6 | 6 |
| 7 #include "platform/wtf/PassRefPtr.h" |
7 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
8 #include "wtf/PassRefPtr.h" | |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
11 | 11 |
12 PassRefPtr<FontVariationSettings> makeFontVariationSettings( | 12 PassRefPtr<FontVariationSettings> makeFontVariationSettings( |
13 std::initializer_list<FontVariationAxis> variationAxes) { | 13 std::initializer_list<FontVariationAxis> variationAxes) { |
14 RefPtr<FontVariationSettings> variationSettings = | 14 RefPtr<FontVariationSettings> variationSettings = |
15 FontVariationSettings::create(); | 15 FontVariationSettings::create(); |
16 | 16 |
17 for (auto axis = variationAxes.begin(); axis != variationAxes.end(); ++axis) { | 17 for (auto axis = variationAxes.begin(); axis != variationAxes.end(); ++axis) { |
18 variationSettings->append(*axis); | 18 variationSettings->append(*axis); |
(...skipping 16 matching lines...) Expand all Loading... |
35 FontVariationSettings::create(); | 35 FontVariationSettings::create(); |
36 | 36 |
37 CHECK_NE(oneAxisA->hash(), oneAxisB->hash()); | 37 CHECK_NE(oneAxisA->hash(), oneAxisB->hash()); |
38 CHECK_NE(oneAxisA->hash(), twoAxes->hash()); | 38 CHECK_NE(oneAxisA->hash(), twoAxes->hash()); |
39 CHECK_NE(oneAxisA->hash(), twoAxesDifferentValue->hash()); | 39 CHECK_NE(oneAxisA->hash(), twoAxesDifferentValue->hash()); |
40 CHECK_NE(emptyVariationSettings->hash(), oneAxisA->hash()); | 40 CHECK_NE(emptyVariationSettings->hash(), oneAxisA->hash()); |
41 CHECK_EQ(emptyVariationSettings->hash(), 0u); | 41 CHECK_EQ(emptyVariationSettings->hash(), 0u); |
42 }; | 42 }; |
43 | 43 |
44 } // namespace blink | 44 } // namespace blink |
OLD | NEW |