Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/FontBuilderTest.cpp

Issue 2161683002: Add LayoutLocale class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test stability Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 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 "core/css/resolver/FontBuilder.h" 5 #include "core/css/resolver/FontBuilder.h"
6 6
7 #include "core/css/CSSFontSelector.h" 7 #include "core/css/CSSFontSelector.h"
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/dom/StyleEngine.h" 9 #include "core/dom/StyleEngine.h"
10 #include "core/frame/Settings.h" 10 #include "core/frame/Settings.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 d.setIsAbsoluteSize(true); 140 d.setIsAbsoluteSize(true);
141 d.setKeywordSize(7); 141 d.setKeywordSize(7);
142 } 142 }
143 static void fontSizeValue(FontBuilder& b) 143 static void fontSizeValue(FontBuilder& b)
144 { 144 {
145 b.setSize(FontDescription::Size(20.0f, 0, false)); 145 b.setSize(FontDescription::Size(20.0f, 0, false));
146 } 146 }
147 147
148 static void fontScriptBase(FontDescription& d) 148 static void fontScriptBase(FontDescription& d)
149 { 149 {
150 d.setLocale("no"); 150 d.setLocale(LayoutLocale::get("no"));
151 } 151 }
152 static void fontScriptValue(FontBuilder& b) 152 static void fontScriptValue(FontBuilder& b)
153 { 153 {
154 b.setLocale("se"); 154 b.setLocale(LayoutLocale::get("se"));
155 } 155 }
156 156
157 INSTANTIATE_TEST_CASE_P(AllFields, FontBuilderAdditiveTest, 157 INSTANTIATE_TEST_CASE_P(AllFields, FontBuilderAdditiveTest,
158 ::testing::Values(FunctionPair(fontWeightBase, fontWeightValue), 158 ::testing::Values(FunctionPair(fontWeightBase, fontWeightValue),
159 FunctionPair(fontStretchBase, fontStretchValue), 159 FunctionPair(fontStretchBase, fontStretchValue),
160 FunctionPair(fontFamilyBase, fontFamilyValue), 160 FunctionPair(fontFamilyBase, fontFamilyValue),
161 FunctionPair(fontFeatureSettingsBase, fontFeatureSettingsValue), 161 FunctionPair(fontFeatureSettingsBase, fontFeatureSettingsValue),
162 FunctionPair(fontStyleBase, fontStyleValue), 162 FunctionPair(fontStyleBase, fontStyleValue),
163 FunctionPair(fontVariantCapsBase, fontVariantCapsValue), 163 FunctionPair(fontVariantCapsBase, fontVariantCapsValue),
164 FunctionPair(fontVariantLigaturesBase, fontVariantLigaturesValue), 164 FunctionPair(fontVariantLigaturesBase, fontVariantLigaturesValue),
165 FunctionPair(fontVariantNumericBase, fontVariantNumericValue), 165 FunctionPair(fontVariantNumericBase, fontVariantNumericValue),
166 FunctionPair(fontTextRenderingBase, fontTextRenderingValue), 166 FunctionPair(fontTextRenderingBase, fontTextRenderingValue),
167 FunctionPair(fontKerningBase, fontKerningValue), 167 FunctionPair(fontKerningBase, fontKerningValue),
168 FunctionPair(fontFontSmoothingBase, fontFontSmoothingValue), 168 FunctionPair(fontFontSmoothingBase, fontFontSmoothingValue),
169 FunctionPair(fontSizeBase, fontSizeValue), 169 FunctionPair(fontSizeBase, fontSizeValue),
170 FunctionPair(fontScriptBase, fontScriptValue))); 170 FunctionPair(fontScriptBase, fontScriptValue)));
171 171
172 } // namespace blink 172 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698