зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1584689 [wpt PR 19384] - [css-fonts] Parse font-optical-sizing and font-language-override, a=testonly
Automatic update from web-platform-tests [css-fonts] Parse font-optical-sizing and font-language-override (#19384) Test font-optical-sizing and font-language-override parsing. https://drafts.csswg.org/css-fonts-4/#property-index -- wpt-commits: 59a49413e716738ae24ce15b53f6be57ce5a93ee wpt-pr: 19384
This commit is contained in:
Родитель
03a9a23fe7
Коммит
e0279c8a49
|
@ -29,12 +29,15 @@ const mediumFontSize = getComputedStyle(box).fontSize;
|
|||
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-language-override', 'normal' , '"ksw"');
|
||||
assert_inherited('font-optical-sizing', 'auto' , 'none');
|
||||
assert_inherited('font-size', mediumFontSize /* medium */, '123px');
|
||||
assert_inherited('font-size-adjust', 'none', '1.5');
|
||||
assert_inherited('font-stretch', '100%' /* normal */, '75%');
|
||||
assert_inherited('font-style', 'normal', 'italic');
|
||||
assert_inherited('font-synthesis', 'weight style', 'none');
|
||||
assert_inherited('font-variant', 'normal', 'none');
|
||||
assert_inherited('font-variant-alternates', 'normal', 'historical-forms');
|
||||
assert_inherited('font-variant-caps', 'normal', 'small-caps');
|
||||
assert_inherited('font-variant-east-asian', 'normal', 'ruby');
|
||||
assert_inherited('font-variant-ligatures', 'normal', 'none');
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Fonts Module Level 4: getComputedStyle().fontLanguageOverride</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-fonts-4/#propdef-font-language-override">
|
||||
<meta name="assert" content="font-language-override computed value is as specified.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value('font-language-override', 'normal');
|
||||
test_computed_value('font-language-override', '"ksw"');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Fonts Module Level 4: parsing font-language-override with invalid values</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-fonts-4/#propdef-font-language-override">
|
||||
<meta name="assert" content="font-language-override supports only the grammar 'normal | <string>'.">
|
||||
<meta name="assert" content="font-language-override string has three letters.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_invalid_value('font-language-override', 'auto');
|
||||
test_invalid_value('font-language-override', 'normal "ksw"');
|
||||
|
||||
test_invalid_value('font-language-override', '"tr"');
|
||||
test_invalid_value('font-language-override', '"1 %"');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Fonts Module Level 4: parsing font-language-override with valid values</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-fonts-4/#propdef-font-language-override">
|
||||
<meta name="assert" content="font-language-override supports the full grammar 'normal | <string>'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_valid_value('font-language-override', 'normal');
|
||||
test_valid_value('font-language-override', '"ksw"');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Fonts Module Level 4: getComputedStyle().fontOpticalSizing</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-fonts-4/#propdef-font-optical-sizing">
|
||||
<meta name="assert" content="font-optical-sizing computed value is as specified.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value('font-optical-sizing', 'auto');
|
||||
test_computed_value('font-optical-sizing', 'none');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Fonts Module Level 4: parsing font-optical-sizing with invalid values</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-fonts-4/#propdef-font-optical-sizing">
|
||||
<meta name="assert" content="font-optical-sizing supports only the grammar 'auto | none'.">
|
||||
<meta name="assert" content="font-optical-sizing string has three letters.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_invalid_value('font-optical-sizing', 'normal');
|
||||
test_invalid_value('font-optical-sizing', 'auto none');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Fonts Module Level 4: parsing font-optical-sizing with valid values</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-fonts-4/#propdef-font-optical-sizing">
|
||||
<meta name="assert" content="font-optical-sizing supports the full grammar 'auto | none'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_valid_value('font-optical-sizing', 'auto');
|
||||
test_valid_value('font-optical-sizing', 'none');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче