Files
rust_browser/tests/external/wpt/fixtures/wpt-css-css-text-white-space-ws-break-spaces-applies-to-006-test.html
Zachary D. Rowitsch 16abbd78e7 Bulk-import 2899 WPT CSS reftests and add import tooling
Add scripts/import_wpt_reftests.py to sparse-clone the upstream WPT repo
and bulk-import qualifying CSS reftests (no JS, no external resources) as
known_fail entries. 23 tests already pass and are promoted. The import
script is idempotent and exposed via `just import-wpt`. CI now prints the
WPT summary (pass=36 known_fail=2877 skip=1) on every run.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 00:15:27 -05:00

97 lines
2.5 KiB
HTML

<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Text Test: 'white-space: break-spaces' applies to 'display: table' element</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<link rel="help" href="https://www.w3.org/TR/css-text-3/#white-space-property">
<link rel="match" href="reference/ws-break-spaces-applies-to-006-ref.html">
<meta content="When 'white-space' is 'break-spaces', then new lines, sequence of white spaces and tabs are preserved and text can wrap, just like pre-wrap, but sequence of preserved white space always takes up space, including at the end of the line and line breaking opportunity exists after every preserved white space character, including between white space characters. In this test, 'display: table' is tested." name="assert">
<!--
Testing of 'white-space: break-spaces':
ws-break-spaces-applies-to-001: display: inline
ws-break-spaces-applies-to-002: display: block
ws-break-spaces-applies-to-003: display: list-item
ws-break-spaces-applies-to-005: display: inline-block
ws-break-spaces-applies-to-006: display: table
ws-break-spaces-applies-to-007: display: inline-table
ws-break-spaces-applies-to-008: display: table-row-group
ws-break-spaces-applies-to-009: display: table-header-group
ws-break-spaces-applies-to-010: display: table-footer-group
ws-break-spaces-applies-to-011: display: table-row
ws-break-spaces-applies-to-012: display: table-column-group
ws-break-spaces-applies-to-013: display: table-column
ws-break-spaces-applies-to-014: display: table-cell
ws-break-spaces-applies-to-015: display: table-caption
-->
<style>
div#test, table#reference
{
border: black solid 2px;
font-family: monospace;
font-size: 32px;
margin-bottom: 0.25em;
width: 4ch;
}
div#test
{
display: table;
white-space: break-spaces;
}
div#row
{
display: table-row;
}
div#cell
{
display: table-cell;
}
table#reference
{
border-spacing: 0px;
white-space: pre;
}
td
{
padding: 0px;
}
</style>
<p>Test passes if the characters inside of each black-bordered rectangles are laid out identically.
<div id="test">
<div id="row">
<div id="cell">123 8</div>
<!-- 45678 -->
<!-- will wrap here ^ -->
</div>
</div>
<table id="reference"><tr><td>123
8</table>