Commit dd9766af authored by Eric Willigers's avatar Eric Willigers Committed by Commit Bot

CSS: font-family initial value unspecified

https://drafts.csswg.org/css-fonts-4/#font-family-prop
Initial: depends on user agent

We can't simply have "times new roman"
in our test expectations, as Mac 10.10 .. 10.12 have
Times instead.

Bug: 966249
Change-Id: I091924585e05b2b085ab420ac553233f7346e79d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1695581
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: default avatarDominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/master@{#676242}
parent 9c456c50
......@@ -6255,6 +6255,3 @@ crbug.com/982289 virtual/gpu-rasterization/images/color-profile-image-canvas.htm
crbug.com/982289 virtual/gpu-rasterization/images/color-profile-mask-image-svg.html [ Pass Failure ]
crbug.com/982289 virtual/gpu-rasterization/images/ycbcr-with-cmyk-color-profile.html [ Pass Failure ]
crbug.com/982289 virtual/gpu-rasterization/images/color-profile-image.html [ Pass Failure ]
# Sheriff 2019-07-09
crbug.com/966249 [ Mac ] external/wpt/css/css-fonts/inheritance.html [ Pass Failure ]
This is a testharness.js-based test.
PASS Property font-family has initial value "times new roman"
PASS Property font-family inherits
PASS Property font-feature-settings has initial value normal
PASS Property font-feature-settings inherits
......
......@@ -12,7 +12,6 @@
<script src="/css/support/inheritance-testcommon.js"></script>
<style>
#box {
font: initial;
font-size: medium;
}
</style>
......@@ -25,10 +24,9 @@
<script>
'use strict';
const box = document.getElementById('box');
const initialFontFamily = getComputedStyle(box).fontFamily;
const mediumFontSize = getComputedStyle(box).fontSize;
assert_inherited('font-family', initialFontFamily, '"Not Initial!"');
assert_inherited('font-family', null, '"Not Initial!"'); // Initial value depends on user agent.
assert_inherited('font-feature-settings', 'normal', '"smcp", "swsh" 2');
assert_inherited('font-kerning', 'auto', 'none');
assert_inherited('font-size', mediumFontSize /* medium */, '123px');
......
......@@ -33,7 +33,8 @@ function assert_initial(property, initial) {
* value.
*/
function assert_inherited(property, initial, other) {
assert_initial(property, initial);
if (initial)
assert_initial(property, initial);
test(() => {
const container = document.getElementById('container');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment