Skip to content

Commit

Permalink
Update various counter style tests to not assume that a range is appl…
Browse files Browse the repository at this point in the history
…ied. DONTBUILD

In particular, for 'hebrew', the spec says: "Implementations must implement
hebrew at least to the range specified in the @counter-style rule above,
but may implement it to a higher range." at
https://drafts.csswg.org/css-counter-styles/#ref-for-hebrew%E2%91%A0
and for CJK: "Because opinions differ on how best to represent numbers 10k
or greater using the longhand CJK styles, all of the counter styles defined
in this section are defined to have a range of -9999 to 9999, but
implementations may support a larger range." at
https://drafts.csswg.org/css-counter-styles/#complex-cjk

Firefox and Chrome (at least) do implement a larger range than the spec
recommends, so there needs to be an alternative reference for these tests
to make them pass (which is OK since the range isn't normative).

Differential Revision: https://phabricator.services.mozilla.com/D129898

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1738356
gecko-commit: 2be753dcd9255d47d78429a71db94a4fc50a1f4b
gecko-reviewers: hiro, TYLin, saschanaz
  • Loading branch information
Mats Palmgren authored and moz-wptsync-bot committed Nov 1, 2021
1 parent 351ee5a commit 5e22630
Show file tree
Hide file tree
Showing 20 changed files with 324 additions and 32 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>hebrew, outside range</title>
<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#simple-numeric'>
<link rel='help' href='https://bugzilla.mozilla.org/show_bug.cgi?id=1738356'>
<meta name='flags' content='font'>
<style>
ol li { list-style-type: hebrew; }
/* the following CSS is not part of the test */
.test { font-size: 25px; }
ol { margin: 0; padding-left: 8em; }
</style>
</head>
<body>
<p class="instructions">Test passes if the two columns are the same, IGNORING the suffix.</p>
<div class="test">
<ol start="10999">
<div><bdi dir=ltr>י׳תתקצט. </bdi>י׳תתקצט</div>
<div><bdi dir=ltr>יא׳. </bdi>11000</div>
<div><bdi dir=ltr>יא׳א. </bdi>11001</div>
</ol>
</div>
<!--Notes:
You will need an appropriate font to run this test.
To see the ASCII decimal number associated with a row, mouse over it and the number will pop up in a tooltip.
-->
</body>
</html>
9 changes: 5 additions & 4 deletions css/css-counter-styles/hebrew/css3-counter-styles-016a.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<!DOCTYPE html>
<html lang="en" >
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta charset="utf-8">
<title>hebrew, outside range</title>
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#simple-numeric'>
<link rel="reviewer" title="Chris Lilley" href="mailto:chris@w3.org" />
<link rel="reviewer" title="Chris Lilley" href="mailto:chris@w3.org">
<link rel='match' href='css3-counter-styles-016a-ref.html'>
<link rel='match' href='css3-counter-styles-016a-alt-ref.html'><!-- Gecko prefers this rendering over the fallback rendering -->
<meta name="assert" content="list-style-type: hebrew produces numbers in the fallback counter style above the limit per the spec.">
<style type='text/css'>
<style>
ol li { list-style-type: hebrew; }
/* the following CSS is not part of the test */
.test { font-size: 25px; }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>japanese-formal, outside range</title>
<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#complex-cjk'>
<link rel='help' href='https://bugzilla.mozilla.org/show_bug.cgi?id=1738356'>
<meta name='flags' content='font'>
<style type='text/css'>
.test { font-size: 25px; }
ol { margin: 0; padding-left: 8em; }
ol li { list-style-type: japanese-formal; }
</style>
</head>
<body>
<p class="instructions">Test fails if the two columns of the first line are NOT the same. Otherwise, test passes only if the left column of the 2nd and 3rd lines is NOT decimal digits and is NOT the same as the right side. Score as Partial if the columns of the 2nd and 3rd lines are the same (ie. fallback was used). In all this IGNORE the suffix.</p>
<div class="test"><ol start="9999">
<div><bdi>九阡九百九拾九、</bdi>九阡九百九拾九</div>
<div><bdi>壱萬、</bdi>一〇〇〇〇</div>
<div><bdi>壱萬壱、</bdi>一〇〇〇一</div>
</ol></div>
<!--Notes:
You will need an appropriate font to run this test.
To see the ASCII decimal number associated with a row, mouse over it and the number will pop up in a tooltip.
-->
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#complex-cjk'>
<link rel="reviewer" title="Chris Lilley" href="mailto:chris@w3.org" />
<link rel='match' href='css3-counter-styles-049-ref.html'>
<link rel='match' href='css3-counter-styles-049-alt-ref.html'><!-- Gecko prefers this rendering over the fallback rendering -->
<meta name="assert" content="[Exploratory] list-style-type: japanese-formal produces counter values outside its range without using the prescribed fallback style.">
<style type='text/css'>
.test { font-size: 25px; }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>japanese-informal, outside range</title>
<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#complex-cjk'>
<link rel='help' href='https://bugzilla.mozilla.org/show_bug.cgi?id=1738356'>
<meta name='flags' content='font'>
<style>
ol li { list-style-type: japanese-informal; }
/* the following CSS is not part of the test */
.test { font-size: 25px; }
ol { margin: 0; padding-left: 8em; }
</style>
</head>
<body>
<p class="instructions">Test fails if the two columns of the first line are NOT the same. Otherwise, test passes only if the left column of the 2nd and 3rd lines is NOT decimal digits and is NOT the same as the right side. Score as Partial if the columns of the 2nd and 3rd lines are the same (ie. fallback was used). In all this IGNORE the suffix.</p>
<div class="test"><ol start="9999">
<div><bdi>九千九百九十九、</bdi>九千九百九十九</div>
<div><bdi>一万、</bdi>一〇〇〇〇</div>
<div><bdi>一万一、</bdi>一〇〇〇一</div>
</ol></div>
<!--Notes:
You will need an appropriate font to run this test.
To see the ASCII decimal number associated with a row, mouse over it and the number will pop up in a tooltip.
-->
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<!DOCTYPE html>
<html lang="en" >
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta charset="utf-8">
<title>japanese-informal, outside range</title>
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#complex-cjk'>
<link rel="reviewer" title="Chris Lilley" href="mailto:chris@w3.org" />
<link rel="reviewer" title="Chris Lilley" href="mailto:chris@w3.org">
<link rel='match' href='css3-counter-styles-044-ref.html'>
<link rel='match' href='css3-counter-styles-044-alt-ref.html'><!-- Gecko prefers this rendering over the fallback rendering -->
<meta name="assert" content="[Exploratory] list-style-type: japanese-informal produces counter values outside its range without using the prescribed fallback style.">
<style type='text/css'>
ol li { list-style-type: japanese-informal; }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>korean-hangul-formal, outside range</title>
<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#complex-cjk'>
<link rel='help' href='https://bugzilla.mozilla.org/show_bug.cgi?id=1738356'>
<meta name='flags' content='font'>
<style>
.test { font-size: 25px; }
ol { margin: 0; padding-left: 8em; }
ol li { list-style-type: korean-hangul-formal; }
</style>
</head>
<body>
<p class="instructions">Test fails if the two columns of the first line are NOT the same. Otherwise, test passes only if the left column of the 2nd and 3rd lines is NOT decimal digits. If it is decimal digits (ie. the fallback) score as Partial. In all this IGNORE the suffix.</p>
<div class="test"><ol start="9999">
<div><bdi>구천구백구십구, </bdi>구천구백구십구</div>
<div><bdi>일만, </bdi>10000.</div>
<div><bdi>일만 일, </bdi>10001.</div>
</ol></div>
<!--Notes:
You will need an appropriate font to run this test.
To see the ASCII decimal number associated with a row, mouse over it and the number will pop up in a tooltip.
-->
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<!DOCTYPE html>
<html lang="en" >
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta charset="utf-8">
<title>korean-hangul-formal, outside range</title>
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#complex-cjk'>
<link rel="reviewer" title="Chris Lilley" href="mailto:chris@w3.org" />
<link rel="reviewer" title="Chris Lilley" href="mailto:chris@w3.org">
<link rel='match' href='css3-counter-styles-054-ref.html'>
<link rel='match' href='css3-counter-styles-054-alt-ref.html'><!-- Gecko prefers this rendering over the fallback rendering -->
<meta name="assert" content="[Exploratory] list-style-type: korean-hangul-formal produces counter values outside its range without using the prescribed fallback style.">
<style type='text/css'>
.test { font-size: 25px; }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>korean-hanja-formal, outside range</title>
<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#complex-cjk'>
<link rel='help' href='https://bugzilla.mozilla.org/show_bug.cgi?id=1738356'>
<meta name='flags' content='font'>
<style>
.test { font-size: 25px; }
ol { margin: 0; padding-left: 8em; }
ol li { list-style-type: korean-hanja-formal; }
</style>
</head>
<body>
<p class="instructions">Test fails if the two columns of the first line are NOT the same. Otherwise, test passes only if the left column of the 2nd and 3rd lines is NOT decimal digits. If it is decimal digits (ie. the fallback) score as Partial. In all this IGNORE the suffix.</p>
<div class="test"><ol start="9999">
<div><bdi>九仟九百九拾九, </bdi>九仟九百九拾九</div>
<div><bdi>壹萬, </bdi>10000.</div>
<div><bdi>壹萬 壹, </bdi>10001.</div>
</ol></div>
<!--Notes:
You will need an appropriate font to run this test.
To see the ASCII decimal number associated with a row, mouse over it and the number will pop up in a tooltip.
-->
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<!DOCTYPE html>
<html lang="en" >
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta charset="utf-8">
<title>korean-hanja-formal, outside range</title>
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#complex-cjk'>
<link rel="reviewer" title="Chris Lilley" href="mailto:chris@w3.org" />
<link rel="reviewer" title="Chris Lilley" href="mailto:chris@w3.org">
<link rel='match' href='css3-counter-styles-064-ref.html'>
<link rel='match' href='css3-counter-styles-064-alt-ref.html'><!-- Gecko prefers this rendering over the fallback rendering -->
<meta name="assert" content="[Exploratory] list-style-type: korean-hanja-formal produces counter values outside its range without using the prescribed fallback style.">
<style type='text/css'>
.test { font-size: 25px; }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>korean-hanja-informal, outside range</title>
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#complex-cjk'>
<meta name='flags' content='font'>
<style>
.test { font-size: 25px; }
ol { margin: 0; padding-left: 8em; }
ol li { list-style-type: korean-hanja-informal; }
</style>
</head>
<body>
<p class="instructions">Test fails if the two columns of the first line are NOT the same. Otherwise, test passes only if the left column of the 2nd and 3rd lines is NOT decimal digits. If it is decimal digits (ie. the fallback) score as Partial. In all this IGNORE the suffix.</p>
<div class="test"><ol start="9999">
<div><bdi>九千九百九十九, </bdi>九千九百九十九</div>
<div><bdi>萬, </bdi>10000.</div>
<div><bdi>萬 一, </bdi>10001.</div>
</ol></div>
<!--Notes:
You will need an appropriate font to run this test.
To see the ASCII decimal number associated with a row, mouse over it and the number will pop up in a tooltip.
-->
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<!DOCTYPE html>
<html lang="en" >
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta charset="utf-8">
<title>korean-hanja-informal, outside range</title>
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#complex-cjk'>
<link rel="reviewer" title="Chris Lilley" href="mailto:chris@w3.org" />
<link rel="reviewer" title="Chris Lilley" href="mailto:chris@w3.org">
<link rel='match' href='css3-counter-styles-059-ref.html'>
<link rel='match' href='css3-counter-styles-059-alt-ref.html'><!-- Gecko prefers this rendering over the fallback rendering -->
<meta name="assert" content="[Exploratory] list-style-type: korean-hanja-informal produces counter values outside its range without using the prescribed fallback style.">
<style type='text/css'>
.test { font-size: 25px; }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>simp-chinese-formal, outside range</title>
<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#complex-cjk'>
<link rel='help' href='https://bugzilla.mozilla.org/show_bug.cgi?id=1738356'>
<meta name='flags' content='font'>
<style>
.test { font-size: 25px; }
ol { margin: 0; padding-left: 8em; }
ol li { list-style-type: simp-chinese-formal; }
</style>
</head>
<body>
<p class="instructions">Test fails if the two columns of the first line are NOT the same. Otherwise, test passes only if the left column of the 2nd and 3rd lines is NOT decimal digits and is NOT the same as the right side. Score as Partial if the columns of the 2nd and 3rd lines are the same (ie. fallback was used). In all this IGNORE the suffix.</p>
<div class="test"><ol start="9999">
<div><bdi>玖仟玖佰玖拾玖、</bdi>玖仟玖佰玖拾玖</div>
<div><bdi>壹万、</bdi>一〇〇〇〇</div>
<div><bdi>壹万零壹、</bdi>一〇〇〇一</div>
</ol></div>
<!--Notes:
You will need an appropriate font to run this test.
To see the ASCII decimal number associated with a row, mouse over it and the number will pop up in a tooltip.
-->
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<!DOCTYPE html>
<html lang="en" >
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta charset="utf-8">
<title>simp-chinese-formal, outside range</title>
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#complex-cjk'>
<link rel="reviewer" title="Chris Lilley" href="mailto:chris@w3.org" />
<link rel="reviewer" title="Chris Lilley" href="mailto:chris@w3.org">
<link rel='match' href='css3-counter-styles-078-ref.html'>
<link rel='match' href='css3-counter-styles-078-alt-ref.html'><!-- Gecko prefers this rendering over the fallback rendering -->
<meta name="assert" content="[Exploratory] list-style-type: simp-chinese-formal produces counter values outside its range without using the prescribed fallback style.">
<style type='text/css'>
<style>
.test { font-size: 25px; }
ol { margin: 0; padding-left: 8em; }
ol { list-style-type: simp-chinese-formal; list-style-position: inside; }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>simp-chinese-informal, outside range</title>
<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#complex-cjk'>
<link rel='help' href='https://bugzilla.mozilla.org/show_bug.cgi?id=1738356'>
<meta name='flags' content='font'>
<style>
.test { font-size: 25px; }
ol { margin: 0; padding-left: 8em; }
ol li { list-style-type: simp-chinese-informal; }
</style>
</head>
<body>
<p class="instructions">Test fails if the two columns of the first line are NOT the same. Otherwise, test passes only if the left column of the 2nd and 3rd lines is NOT decimal digits and is NOT the same as the right side. Score as Partial if the columns of the 2nd and 3rd lines are the same (ie. fallback was used). In all this IGNORE the suffix.</p>
<div class="test"><ol start="9999">
<div><bdi>九千九百九十九、</bdi>九千九百九十九</div>
<div><bdi>一万、</bdi>一〇〇〇〇</div>
<div><bdi>一万零一、</bdi>一〇〇〇一</div>
</ol></div>
<!--Notes:
You will need an appropriate font to run this test.
To see the ASCII decimal number associated with a row, mouse over it and the number will pop up in a tooltip.
-->
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<!DOCTYPE html>
<html lang="en" >
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta charset="utf-8">
<title>simp-chinese-informal, outside range</title>
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#complex-cjk'>
<link rel="reviewer" title="Chris Lilley" href="mailto:chris@w3.org" />
<link rel="reviewer" title="Chris Lilley" href="mailto:chris@w3.org">
<link rel='match' href='css3-counter-styles-073-ref.html'>
<link rel='match' href='css3-counter-styles-073-alt-ref.html'><!-- Gecko prefers this rendering over the fallback rendering -->
<meta name="assert" content="[Exploratory] list-style-type: simp-chinese-informal produces counter values outside its range without using the prescribed fallback style.">
<style type='text/css'>
<style>
.test { font-size: 25px; }
ol { margin: 0; padding-left: 8em; }
ol { list-style-type: simp-chinese-informal; list-style-position: inside; }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>trad-chinese-formal, outside range</title>
<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#complex-cjk'>
<link rel='help' href='https://bugzilla.mozilla.org/show_bug.cgi?id=1738356'>
<meta name='flags' content='font'>
<style>
.test { font-size: 25px; }
ol { margin: 0; padding-left: 8em; }
ol li { list-style-type: trad-chinese-formal; }
</style>
</head>
<body>
<p class="instructions">Test fails if the two columns of the first line are NOT the same. Otherwise, test passes only if the left column of the 2nd and 3rd lines is NOT decimal digits and is NOT the same as the right side. Score as Partial if the columns of the 2nd and 3rd lines are the same (ie. fallback was used). In all this IGNORE the suffix.</p>
<div class="test"><ol start="9999">
<div><bdi>玖仟玖佰玖拾玖、</bdi>玖仟玖佰玖拾玖</div>
<div><bdi>壹萬、</bdi>一〇〇〇〇</div>
<div><bdi>壹萬零壹、</bdi>一〇〇〇一</div>
</ol></div>
<!--Notes:
You will need an appropriate font to run this test.
To see the ASCII decimal number associated with a row, mouse over it and the number will pop up in a tooltip.
-->
</body>
</html>
Loading

1 comment on commit 5e22630

@community-tc-integration
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh oh! Looks like an error! Details

Failed to fetch task artifact public/results/checkrun.md for GitHub integration.
cannot GET /CGvxIOB9RR2fzRTEDufXew/0/public/results/checkrun.md (500)

Please sign in to comment.