diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:47:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:47:29 +0000 |
commit | 0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d (patch) | |
tree | a31f07c9bcca9d56ce61e9a1ffd30ef350d513aa /testing/web-platform/tests/css/css-text/writing-system | |
parent | Initial commit. (diff) | |
download | firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.tar.xz firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.zip |
Adding upstream version 115.8.0esr.upstream/115.8.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-text/writing-system')
10 files changed, 192 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-text/writing-system/reference/writing-system-font-001-ref.html b/testing/web-platform/tests/css/css-text/writing-system/reference/writing-system-font-001-ref.html new file mode 100644 index 0000000000..f0bd7fe262 --- /dev/null +++ b/testing/web-platform/tests/css/css-text/writing-system/reference/writing-system-font-001-ref.html @@ -0,0 +1,20 @@ +<!doctype html> +<html lang=en> +<meta charset=utf-8> +<title>CSS test reference</title> +<link rel=author title="Ambrose Li" href="http://port.ambroseli.ca/"> +<link rel=author title="Florian Rivoal" href="https://florian.rivoal.net"> + +<p>The test passes if the word pairs below are all displayed in the same font. + +<table> + <tr> + <td>ping4 on1 + <td>salaam + <td>shalom + <tr> + <td>ping4 on1 + <td>salaam + <td>shalom +</table> + diff --git a/testing/web-platform/tests/css/css-text/writing-system/reference/writing-system-line-break-001-ref.html b/testing/web-platform/tests/css/css-text/writing-system/reference/writing-system-line-break-001-ref.html new file mode 100644 index 0000000000..3aa1c84ab6 --- /dev/null +++ b/testing/web-platform/tests/css/css-text/writing-system/reference/writing-system-line-break-001-ref.html @@ -0,0 +1,19 @@ +<!doctype html> +<html lang=en> +<meta charset=utf-8> +<title>CSS test reference</title> +<link rel=author title="Florian Rivoal" href="https://florian.rivoal.net"> +<style> +div { + font-family: monospace; + width: 2em; +} +[lang=ja] { border: solid blue; } +[lang=ja-Hang] { border: solid orange; } +</style> + +<p>The test passes if the second line in the blue box below <em>starts with</em> a “〜”, +and if the second line in the orange box below <em>ends with</em> a “〜”. + +<div lang=ja>東京<br>〜大<br>阪</div> +<div lang=ja-Hang>도<br>쿄〜<br>오사<br>카</div> diff --git a/testing/web-platform/tests/css/css-text/writing-system/reference/writing-system-line-break-002-ref.html b/testing/web-platform/tests/css/css-text/writing-system/reference/writing-system-line-break-002-ref.html new file mode 100644 index 0000000000..2855797d35 --- /dev/null +++ b/testing/web-platform/tests/css/css-text/writing-system/reference/writing-system-line-break-002-ref.html @@ -0,0 +1,11 @@ +<!doctype html> +<html lang=en> +<meta charset=utf-8> +<title>CSS test reference</title> +<link rel=author title="Florian Rivoal" href="https://florian.rivoal.net"> +<style> +</style> + +<p>The test passes if the question mark in the phrase below is alone on the second line. + +<div lang=en-Hrkt>ハロー、ハウアーユー<br>?</div> diff --git a/testing/web-platform/tests/css/css-text/writing-system/reference/writing-system-segment-break-001-ref.html b/testing/web-platform/tests/css/css-text/writing-system/reference/writing-system-segment-break-001-ref.html new file mode 100644 index 0000000000..f451a74a51 --- /dev/null +++ b/testing/web-platform/tests/css/css-text/writing-system/reference/writing-system-segment-break-001-ref.html @@ -0,0 +1,10 @@ +<!doctype html> +<html lang=en> +<meta charset=utf-8> +<title>CSS test reference</title> +<link rel=author title="Florian Rivoal" href="https://florian.rivoal.net"> + +<p>The test passes if the both lines are identical, including the spacing of the characters. + +<div lang=ain-Kana>“アイヌイタㇰ”</div> +<div lang=ain-Kana>“アイヌイタㇰ”</div> diff --git a/testing/web-platform/tests/css/css-text/writing-system/reference/writing-system-text-transform-001-ref.html b/testing/web-platform/tests/css/css-text/writing-system/reference/writing-system-text-transform-001-ref.html new file mode 100644 index 0000000000..9b50fb1331 --- /dev/null +++ b/testing/web-platform/tests/css/css-text/writing-system/reference/writing-system-text-transform-001-ref.html @@ -0,0 +1,13 @@ +<!doctype html> +<html lang=en> +<meta charset=utf-8> +<title>CSS test reference</title> +<link rel=author title="Florian Rivoal" href="https://florian.rivoal.net"> +<style> +div { + font-size: 3em; +} +</style> +<p>Test passes if the two words below are identical: there must be a dot on the “i” letter at the beginning of the word. +<div lang=tr-Cyrl>iстанбул</div> +<div lang=tr-Cyrl>iстанбул</div> diff --git a/testing/web-platform/tests/css/css-text/writing-system/writing-system-font-001.html b/testing/web-platform/tests/css/css-text/writing-system/writing-system-font-001.html new file mode 100644 index 0000000000..a8d4549279 --- /dev/null +++ b/testing/web-platform/tests/css/css-text/writing-system/writing-system-font-001.html @@ -0,0 +1,25 @@ +<!doctype html> +<html lang=en> +<meta charset=utf-8> +<title>CSS test: font selection and writing sytem</title> +<link rel=author title="Ambrose Li" href="http://port.ambroseli.ca/"> +<link rel=author title="Florian Rivoal" href="https://florian.rivoal.net"> +<link rel=help href="https://drafts.csswg.org/css-text-3/#languages"> +<link rel=help href="https://drafts.csswg.org/css-text-3/#script-tagging"> +<link rel=help href="https://drafts.csswg.org/css-fonts-4/#language-specific-support"> +<link rel=match href="reference/writing-system-font-001-ref.html"> +<meta name=assert content="An explicit writing system takes precedence over the content language for font selection"> + +<p>The test passes if the word pairs below are all displayed in the same font. + +<table> + <tr> + <td>ping4 on1 + <td>salaam + <td>shalom + <tr> + <td><span lang=zh-yue-latn>ping4 on1</span> + <td><span lang=ar-latn>salaam</span> + <td><span lang=he-latn>shalom</span> +</table> + diff --git a/testing/web-platform/tests/css/css-text/writing-system/writing-system-line-break-001.html b/testing/web-platform/tests/css/css-text/writing-system/writing-system-line-break-001.html new file mode 100644 index 0000000000..6d52672b89 --- /dev/null +++ b/testing/web-platform/tests/css/css-text/writing-system/writing-system-line-break-001.html @@ -0,0 +1,26 @@ +<!doctype html> +<html lang=en> +<meta charset=utf-8> +<title>CSS test: writing system and line breaking</title> +<link rel=author title="Florian Rivoal" href="https://florian.rivoal.net"> +<link rel=help href="https://drafts.csswg.org/css-text-3/#languages"> +<link rel=help href="https://drafts.csswg.org/css-text-3/#script-tagging"> +<link rel=help href="https://drafts.csswg.org/css-text-3/#propdef-line-break"> +<link rel=match href="reference/writing-system-line-break-001-ref.html"> +<meta name=assert content="breaks before U+301C when line-break is loose are allowed if the content language is Japanese, +but not when the writing system is not Japanese/Chinese (e.g. Korean)."> +<style> +div { + font-family: monospace; + width: 2em; + line-break: loose; +} +[lang=ja] { border: solid blue; } +[lang=ja-Hang] { border: solid orange; } +</style> + +<p>The test passes if the second line in the blue box below <em>starts with</em> a “〜”, +and if the second line in the orange box below <em>ends with</em> a “〜”. + +<div lang=ja>東京〜大阪</div> +<div lang=ja-Hang>도쿄〜오사카</div> diff --git a/testing/web-platform/tests/css/css-text/writing-system/writing-system-line-break-002.html b/testing/web-platform/tests/css/css-text/writing-system/writing-system-line-break-002.html new file mode 100644 index 0000000000..a973560a6e --- /dev/null +++ b/testing/web-platform/tests/css/css-text/writing-system/writing-system-line-break-002.html @@ -0,0 +1,22 @@ +<!doctype html> +<html lang=en> +<meta charset=utf-8> +<title>CSS test: writing system and line breaking</title> +<link rel=author title="Florian Rivoal" href="https://florian.rivoal.net"> +<link rel=help href="https://drafts.csswg.org/css-text-3/#languages"> +<link rel=help href="https://drafts.csswg.org/css-text-3/#script-tagging"> +<link rel=help href="https://drafts.csswg.org/css-text-3/#propdef-line-break"> +<link rel=match href="reference/writing-system-line-break-002-ref.html"> +<meta name=assert content="breaks before U+FF1F when line-break is loose are allowed +if the writing system is Japanese (which includes Hrkt), +but even when the language not Japanese."> +<style> +div { + width: 10em; + line-break: loose; +} +</style> + +<p>The test passes if the question mark in the phrase below is alone on the second line. + +<div lang=en-Hrkt>ハロー、ハウアーユー?</div> diff --git a/testing/web-platform/tests/css/css-text/writing-system/writing-system-segment-break-001.html b/testing/web-platform/tests/css/css-text/writing-system/writing-system-segment-break-001.html new file mode 100644 index 0000000000..1d560d9f49 --- /dev/null +++ b/testing/web-platform/tests/css/css-text/writing-system/writing-system-segment-break-001.html @@ -0,0 +1,27 @@ +<!doctype html> +<html lang=en> +<meta charset=utf-8> +<title>CSS test: writing system and segment break transformation</title> +<link rel=author title="Florian Rivoal" href="https://florian.rivoal.net"> +<link rel=help href="https://drafts.csswg.org/css-text-3/#languages"> +<link rel=help href="https://drafts.csswg.org/css-text-3/#script-tagging"> +<link rel=help href="https://drafts.csswg.org/css-text-3/#line-break-transform"> +<link rel=match href="reference/writing-system-segment-break-001-ref.html"> +<meta name=assert content="If the writing system of the segment break is Chinese, Japanese, or Yi, +and the character before or after the segment break is punctuation or a symbol (Unicode general category P* or S*) +and has an East Asian Width property of A or is Emoji, +and the character on the other side of the segment break is F, W, or H, and not Hangul or Emoji, +then the segment break is removed."> +<!-- +In this case, checking with “ and ” which are punctuation with East Asian Width of A, +next to Katakana letters (which are W), +while the writing system is Katakana, which is classified as Japanese, +despite a non Japanese content language (Ainu). +--> + +<p>The test passes if the both lines are identical, including the spacing of the characters. + +<div lang=ain-Kana>“ +アイヌイタㇰ +”</div> +<div lang=ain-Kana>“アイヌイタㇰ”</div> diff --git a/testing/web-platform/tests/css/css-text/writing-system/writing-system-text-transform-001.html b/testing/web-platform/tests/css/css-text/writing-system/writing-system-text-transform-001.html new file mode 100644 index 0000000000..209d56c951 --- /dev/null +++ b/testing/web-platform/tests/css/css-text/writing-system/writing-system-text-transform-001.html @@ -0,0 +1,19 @@ +<!doctype html> +<html lang=en> +<meta charset=utf-8> +<title>CSS test: text-transform and writing systems</title> +<link rel=author title="Florian Rivoal" href="https://florian.rivoal.net"> +<link rel=help href="https://drafts.csswg.org/css-text-3/#languages"> +<link rel=help href="https://drafts.csswg.org/css-text-3/#script-tagging"> +<link rel=help href="https://drafts.csswg.org/css-text-3/#propdef-text-transform"> +<link rel=match href="reference/writing-system-text-transform-001-ref.html"> +<meta name=assert content="text transform rules that depend on the language are overriden by a contradicting explicit script tag."> +<style> +div { + text-transform: lowercase; + font-size: 3em; +} +</style> +<p>Test passes if the two words below are identical: there must be a dot on the “i” letter at the beginning of the word. +<div lang=tr-Cyrl>IСТАНБУЛ</div> +<div lang=tr-Cyrl>iстанбул</div> |