diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /testing/web-platform/tests/css/css-text/white-space/white-space-collapse-001.html | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-text/white-space/white-space-collapse-001.html')
-rw-r--r-- | testing/web-platform/tests/css/css-text/white-space/white-space-collapse-001.html | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-text/white-space/white-space-collapse-001.html b/testing/web-platform/tests/css/css-text/white-space/white-space-collapse-001.html new file mode 100644 index 0000000000..7b4f2333d1 --- /dev/null +++ b/testing/web-platform/tests/css/css-text/white-space/white-space-collapse-001.html @@ -0,0 +1,66 @@ +<!DOCTYPE html> +<html lang="en" > +<head> +<meta charset="utf-8"> +<title>White space and non-ASCII spaces</title> +<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> +<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-break-transform'> +<meta name="assert" content="Any space immediately following another collapsible space is collapsed to have zero advance width. Only refers to U+0020, not other Unicode spaces."> +<style type='text/css'> +.test span { font-size: 24px; font-family: sans-serif; background-color: #2AA5F7; color: white; } +.ref span { font-size: 24px; font-family: sans-serif; background-color: #270CEF; color: white; } +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +</head> +<body> +<div id='log'></div> +<div id='testNB' class="test"><span>hello           there</span></div> +<div id="refNB" class="ref"><span>hello   there</span></div> +<div id='testEN' class="test"><span>hello           there</span></div> +<div id="refEN" class="ref"><span>hello   there</span></div> +<div id='testEM' class="test"><span>hello           there</span></div> +<div id="refEM" class="ref"><span>hello   there</span></div> +<div id='testTS' class="test"><span>hello           there</span></div> +<div id="refTS" class="ref"><span>hello   there</span></div> +<div id='testZW' class="test"><span>hello   ​       there</span></div> +<div id="refZW" class="ref"><span>hello ​ there</span></div> +<div id='testNNB' class="test"><span>hello           there</span></div> +<div id="refNNB" class="ref"><span>hello   there</span></div> +<div id='testIS' class="test"><span>hello           there</span></div> +<div id="refIS" class="ref"><span>hello   there</span></div> +<div id='testIS2' class="test"><span>缔造真正全球通行           的万维网</span></div> +<div id="refIS2" class="ref"><span>缔造真正全球通行   的万维网</span></div> +<script> +test(function() { +assert_equals(document.getElementById('testNB').firstChild.offsetWidth, document.getElementById('refNB').firstChild.offsetWidth); +}, "no-break space"); +test(function() { +assert_equals(document.getElementById('testEN').firstChild.offsetWidth, document.getElementById('refEN').firstChild.offsetWidth); +}, "en space"); +test(function() { +assert_equals(document.getElementById('testEM').firstChild.offsetWidth, document.getElementById('refEM').firstChild.offsetWidth); +}, "em space"); +test(function() { +assert_equals(document.getElementById('testTS').firstChild.offsetWidth, document.getElementById('refTS').firstChild.offsetWidth); +}, "thin space"); +test(function() { +assert_equals(document.getElementById('testZW').firstChild.offsetWidth, document.getElementById('refZW').firstChild.offsetWidth); +}, "zero width space"); +test(function() { +assert_equals(document.getElementById('testZW').firstChild.offsetWidth, document.getElementById('refZW').firstChild.offsetWidth); +}, "narrow no-break space"); +test(function() { +assert_equals(document.getElementById('testIS').firstChild.offsetWidth, document.getElementById('refIS').firstChild.offsetWidth); +}, "ideographic space"); +test(function() { +assert_equals(document.getElementById('testIS2').firstChild.offsetWidth, document.getElementById('refIS2').firstChild.offsetWidth); +}, "ideographic space inside ideographic text"); +</script> +<!-- Notes: +The assertion will fail if space is produced for any line in the test paragraph. +--> +</body> +</html> + + |