зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1461589 - Add/update CSS parsing tests to cover font-variant-emoji. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D147496
This commit is contained in:
Родитель
8888937e07
Коммит
ee4d1a7219
|
@ -5537,6 +5537,7 @@ var gCSSProperties = {
|
|||
"font-variant-alternates",
|
||||
"font-variant-caps",
|
||||
"font-variant-east-asian",
|
||||
"font-variant-emoji",
|
||||
"font-variant-ligatures",
|
||||
"font-variant-numeric",
|
||||
"font-variant-position",
|
||||
|
@ -5804,6 +5805,7 @@ var gCSSProperties = {
|
|||
"font-variant-alternates",
|
||||
"font-variant-caps",
|
||||
"font-variant-east-asian",
|
||||
"font-variant-emoji",
|
||||
"font-variant-ligatures",
|
||||
"font-variant-numeric",
|
||||
"font-variant-position",
|
||||
|
@ -5925,6 +5927,25 @@ var gCSSProperties = {
|
|||
"jis78 ruby simplified",
|
||||
],
|
||||
},
|
||||
"font-variant-emoji": {
|
||||
domProp: "fontVariantEmoji",
|
||||
inherited: true,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
applies_to_first_letter: true,
|
||||
applies_to_first_line: true,
|
||||
applies_to_marker: true,
|
||||
applies_to_placeholder: true,
|
||||
applies_to_cue: true,
|
||||
initial_values: ["normal"],
|
||||
other_values: ["text", "emoji", "unicode"],
|
||||
invalid_values: [
|
||||
"none",
|
||||
"auto",
|
||||
"text emoji",
|
||||
"auto text",
|
||||
"normal, unicode",
|
||||
],
|
||||
},
|
||||
"font-variant-ligatures": {
|
||||
domProp: "fontVariantLigatures",
|
||||
inherited: true,
|
||||
|
|
|
@ -67,6 +67,7 @@ var all_but_one = {
|
|||
"font-variant-alternates": "normal", // has to be default value
|
||||
"font-variant-caps": "normal", // has to be default value
|
||||
"font-variant-east-asian": "normal", // has to be default value
|
||||
"font-variant-emoji": "auto", // has to be default value
|
||||
"font-variant-ligatures": "normal", // has to be default value
|
||||
"font-variant-numeric": "normal", // has to be default value
|
||||
"font-variant-position": "normal", // has to be default value
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Inheritance of CSS Fonts Level 3 properties</title>
|
||||
<title>Inheritance of CSS Fonts Level 3 & 4 properties</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-fonts-3/#property-index">
|
||||
<link rel="help" href="https://www.w3.org/TR/css-fonts-4/#property-index">
|
||||
<meta name="assert" content="Properties inherit according to the spec.">
|
||||
|
@ -40,6 +40,7 @@ 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-emoji', 'normal', 'text');
|
||||
assert_inherited('font-variant-ligatures', 'normal', 'none');
|
||||
assert_inherited('font-variant-numeric', 'normal', 'ordinal');
|
||||
assert_inherited('font-variant-position', 'normal', 'super');
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Fonts Module Level 4: getComputedStyle().fontVariantEmoji</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-fonts-4/#font-variant-emoji-prop">
|
||||
<meta name="assert" content="font-variant-emoji 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-variant-emoji', 'normal');
|
||||
test_computed_value('font-variant-emoji', 'text');
|
||||
test_computed_value('font-variant-emoji', 'emoji');
|
||||
test_computed_value('font-variant-emoji', 'unicode');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Fonts Module Level 4: parsing font-variant-emoji with invalid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-fonts-4/#font-variant-emoji-prop">
|
||||
<meta name="assert" content="font-variant-emoji supports only the grammar 'normal | text | emoji | unicode'.">
|
||||
<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-variant-emoji', 'auto');
|
||||
test_invalid_value('font-variant-emoji', 'none');
|
||||
test_invalid_value('font-variant-emoji', 'color');
|
||||
test_invalid_value('font-variant-emoji', 'normal text');
|
||||
test_invalid_value('font-variant-emoji', 'text emoji');
|
||||
test_invalid_value('font-variant-emoji', 'normal, unicode');
|
||||
test_invalid_value('font-variant-emoji', 'unicode, emoji');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Fonts Module Level 4: parsing font-variant-emoji with valid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-fonts-4/#font-variant-emoji-prop">
|
||||
<meta name="assert" content="font-variant-emoji supports the full grammar 'normal | text | emoji | unicode'.">
|
||||
<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-variant-emoji', 'normal');
|
||||
test_valid_value('font-variant-emoji', 'text');
|
||||
test_valid_value('font-variant-emoji', 'emoji');
|
||||
test_valid_value('font-variant-emoji', 'unicode');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче