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

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

Issue 1955723004: Implement font-variant-numeric (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/resolver/FontBuilderTest.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/FontBuilderTest.cpp b/third_party/WebKit/Source/core/css/resolver/FontBuilderTest.cpp
index 64e924d757a12d5e5eb3c4fc0bf672917cd7c768..3206d150354db8ebf29c20d34827ea014b852737 100644
--- a/third_party/WebKit/Source/core/css/resolver/FontBuilderTest.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/FontBuilderTest.cpp
@@ -115,6 +115,14 @@ static void fontVariantCapsValue(FontBuilder& b) { b.setVariantCaps(FontDescript
static void fontVariantLigaturesBase(FontDescription& d) { d.setVariantLigatures(FontDescription::VariantLigatures(FontDescription::EnabledLigaturesState)); }
static void fontVariantLigaturesValue(FontBuilder& b) { b.setVariantLigatures(FontDescription::VariantLigatures(FontDescription::DisabledLigaturesState)); }
+static void fontVariantNumericBase(FontDescription& d) { d.setVariantNumeric(FontVariantNumeric()); }
+static void fontVariantNumericValue(FontBuilder& b)
+{
+ FontVariantNumeric variantNumeric;
+ variantNumeric.setNumericFraction(FontVariantNumeric::StackedFractions);
+ b.setVariantNumeric(variantNumeric);
+}
+
static void fontTextRenderingBase(FontDescription& d) { d.setTextRendering(GeometricPrecision); }
static void fontTextRenderingValue(FontBuilder& b) { b.setTextRendering(OptimizeLegibility); }
@@ -153,6 +161,7 @@ INSTANTIATE_TEST_CASE_P(AllFields, FontBuilderAdditiveTest,
FunctionPair(fontStyleBase, fontStyleValue),
FunctionPair(fontVariantCapsBase, fontVariantCapsValue),
FunctionPair(fontVariantLigaturesBase, fontVariantLigaturesValue),
+ FunctionPair(fontVariantNumericBase, fontVariantNumericValue),
FunctionPair(fontTextRenderingBase, fontTextRenderingValue),
FunctionPair(fontKerningBase, fontKerningValue),
FunctionPair(fontFontSmoothingBase, fontFontSmoothingValue),

Powered by Google App Engine
This is Rietveld 408576698