mirror of
https://github.com/servo/servo.git
synced 2025-08-13 01:15:34 +01:00
Update web-platform-tests to revision 7a6f5673ff5d146ca5c09c6a1b42b7706cfee328
This commit is contained in:
parent
e2fca1b228
commit
4787b28da3
261 changed files with 8195 additions and 4689 deletions
|
@ -0,0 +1,44 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Text: A sequence of collapsible spaces at the end of a line is removed</title>
|
||||
<link rel='help' href='https://drafts.csswg.org/css-text-3/#white-space-phase-2'>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
#container > div {
|
||||
display: inline-block;
|
||||
-font-family: Ahem;
|
||||
font-size: 10px;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div id=log></div>
|
||||
<div id=container>
|
||||
<div>1111</div>
|
||||
<div>1111 </div>
|
||||
<div> 1111</div>
|
||||
<div> 1111 </div>
|
||||
<div>1111<br></div>
|
||||
<div>1111<br> </div>
|
||||
<div>1111 <br></div>
|
||||
<div>1111 <br> </div>
|
||||
</div>
|
||||
<script>
|
||||
(function () {
|
||||
const epsilon = 1;
|
||||
let elements = Array.from(container.children);
|
||||
let reference = elements[0];
|
||||
let reference_width = reference.offsetWidth;
|
||||
for (let element of elements) {
|
||||
test(() => {
|
||||
assert_approx_equals(element.offsetWidth, reference_width, epsilon);
|
||||
}, escapeSpaces(element.innerHTML));
|
||||
}
|
||||
})();
|
||||
|
||||
function escapeSpaces(text) {
|
||||
return text
|
||||
.replace(/ /g, ' ')
|
||||
.replace(/\n/g, '
')
|
||||
}
|
||||
</script>
|
||||
</body>
|
Loading…
Add table
Add a link
Reference in a new issue