mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update CSS tests to revision d674587d6ae7d2e231d632785559f2613d554eb0
This commit is contained in:
parent
7c45ff8e05
commit
f235d49372
6623 changed files with 267392 additions and 10061 deletions
|
@ -0,0 +1,66 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<title>White space and non-ASCII spaces</title>
|
||||
<link href="mailto:ishida@w3.org" rel="author" title="Richard Ishida">
|
||||
<link href="https://drafts.csswg.org/css-text-3/#line-break-transform" rel="help">
|
||||
<meta content="Any space immediately following another collapsible space is collapsed to have zero advance width. Only refers to U+0020, not other Unicode spaces." name="assert">
|
||||
<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 class="test" id="testNB"><span>hello there</span></div>
|
||||
<div class="ref" id="refNB"><span>hello there</span></div>
|
||||
<div class="test" id="testEN"><span>hello   there</span></div>
|
||||
<div class="ref" id="refEN"><span>hello   there</span></div>
|
||||
<div class="test" id="testEM"><span>hello   there</span></div>
|
||||
<div class="ref" id="refEM"><span>hello   there</span></div>
|
||||
<div class="test" id="testTS"><span>hello   there</span></div>
|
||||
<div class="ref" id="refTS"><span>hello   there</span></div>
|
||||
<div class="test" id="testZW"><span>hello ​ there</span></div>
|
||||
<div class="ref" id="refZW"><span>hello ​ there</span></div>
|
||||
<div class="test" id="testNNB"><span>hello   there</span></div>
|
||||
<div class="ref" id="refNNB"><span>hello   there</span></div>
|
||||
<div class="test" id="testIS"><span>hello there</span></div>
|
||||
<div class="ref" id="refIS"><span>hello there</span></div>
|
||||
<div class="test" id="testIS2"><span>缔造真正全球通行 的万维网</span></div>
|
||||
<div class="ref" id="refIS2"><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>
|
Loading…
Add table
Add a link
Reference in a new issue