chromium/third_party/blink/web_tests/external/wpt/css/css-text/word-break/word-break-min-content-007.html

<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Test: min-content sizing and white-space: pre-wrap</title>
<link rel="author" title="Javier Fernandez" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#word-break-property">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-word-break-break-word">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#propdef-white-space">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre-wrap">
<link rel="match" href="../overflow-wrap/reference/overflow-wrap-min-content-size-009-ref.html">
<meta name="assert" content="word-break: break-word should behave as overflow-wrap: anywhere, so breaking opportunities **are not** considered when calculating min-content intrinsic sizes.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
<style>
div {
    font: 20px/1 Ahem;
}
.test {
    color: green;
    background: red;
    z-index: -1;

    width: min-content;
    white-space: pre-wrap;
    word-break: break-word;
}
.ref {
    position: absolute;
    background: green;
    color: transparent;
}
</style>

<p>Test passes if there is a green box below and no red.
<div class="ref"><br><br>X</div>
<div class="test">&#9;&#9;<span>XX</span></div>