blob: 3cba9f60df659ca1f8609db3256a0bf8285b6f61 [file] [log] [blame]
This is a testharness.js-based test.
Found 214 tests; 212 PASS, 2 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS Simplest possible test ("<div>abc")
PASS Leading whitespace removed ("<div> abc")
PASS Trailing whitespace removed ("<div>abc ")
PASS Internal whitespace compressed ("<div>abc def")
PASS \n converted to space ("<div>abc\ndef")
PASS \r converted to space ("<div>abc\rdef")
PASS \t converted to space ("<div>abc\tdef")
PASS Trailing whitespace before hard line break removed ("<div>abc <br>def")
PASS Leading whitespace preserved ("<pre> abc")
PASS Trailing whitespace preserved ("<pre>abc ")
PASS Internal whitespace preserved ("<pre>abc def")
PASS \n preserved ("<pre>abc\ndef")
PASS \r converted to newline ("<pre>abc\rdef")
PASS \t preserved ("<pre>abc\tdef")
PASS Two <pre> siblings ("<div><pre>abc</pre><pre>def</pre>")
PASS Leading whitespace preserved ("<div style='white-space:pre'> abc")
PASS Trailing whitespace preserved ("<div style='white-space:pre'>abc ")
PASS Internal whitespace preserved ("<div style='white-space:pre'>abc def")
PASS \n preserved ("<div style='white-space:pre'>abc\ndef")
PASS \r converted to newline ("<div style='white-space:pre'>abc\rdef")
PASS \t preserved ("<div style='white-space:pre'>abc\tdef")
PASS Leading whitespace preserved ("<span style='white-space:pre'> abc")
PASS Trailing whitespace preserved ("<span style='white-space:pre'>abc ")
PASS Internal whitespace preserved ("<span style='white-space:pre'>abc def")
PASS \n preserved ("<span style='white-space:pre'>abc\ndef")
PASS \r converted to newline ("<span style='white-space:pre'>abc\rdef")
PASS \t preserved ("<span style='white-space:pre'>abc\tdef")
PASS Leading whitespace removed ("<div style='white-space:pre-line'> abc")
PASS Trailing whitespace removed ("<div style='white-space:pre-line'>abc ")
PASS Internal whitespace collapsed ("<div style='white-space:pre-line'>abc def")
PASS \n preserved ("<div style='white-space:pre-line'>abc\ndef")
PASS \r converted to newline ("<div style='white-space:pre-line'>abc\rdef")
PASS \t converted to space ("<div style='white-space:pre-line'>abc\tdef")
PASS Whitespace collapses across element boundaries ("<div><span>abc </span> def")
PASS Whitespace collapses across element boundaries ("<div><span>abc </span><span></span> def")
PASS Whitespace collapses across element boundaries ("<div><span>abc </span><span style='white-space:pre'></span> def")
PASS Soft line breaks ignored ("<div style='width:0'>abc def")
PASS Whitespace text node preserved ("<div style='width:0'><span>abc</span> <span>def</span>")
PASS ::first-line styles applied ("<div class='first-line-uppercase' style='width:0'>abc def")
PASS ::first-letter styles applied ("<div class='first-letter-uppercase' style='width:0'>abc def")
PASS ::first-letter float ignored ("<div class='first-letter-float' style='width:0'>abc def")
PASS &nbsp; preserved ("<div>&nbsp;")
PASS display:none container ("<div style='display:none'>abc")
PASS No whitespace compression in display:none container ("<div style='display:none'>abc def")
PASS No removal of leading/trailing whitespace in display:none container ("<div style='display:none'> abc def ")
PASS display:none child not rendered ("<div>123<span style='display:none'>abc")
PASS display:none container with non-display-none target child ("<div style='display:none'><span id='target'>abc")
PASS non-display-none child of svg ("<div id='target'>abc")
PASS display:none child of svg ("<div style='display:none' id='target'>abc")
PASS child of display:none child of svg ("<div style='display:none'><div id='target'>abc")
PASS display:contents container ("<div style='display:contents'>abc")
PASS display:contents container ("<div><div style='display:contents'>abc")
PASS display:contents rendered ("<div>123<span style='display:contents'>abc")
PASS display:contents not processed via textContent ("<div style='display:contents'> ")
PASS display:contents not processed via textContent ("<div><div style='display:contents'> ")
PASS visibility:hidden container ("<div style='visibility:hidden'>abc")
PASS visibility:hidden child not rendered ("<div>123<span style='visibility:hidden'>abc")
PASS visibility:visible child rendered ("<div style='visibility:hidden'>123<span style='visibility:visible'>abc")
PASS visibility:collapse row-group ("<table><tbody style='visibility:collapse'><tr><td>abc")
PASS visibility:collapse row ("<table><tr style='visibility:collapse'><td>abc")
PASS visibility:collapse cell ("<table><tr><td style='visibility:collapse'>abc")
PASS visibility:collapse row-group with visible cell ("<table><tbody style='visibility:collapse'><tr><td style='visibility:visible'>abc")
PASS visibility:collapse row with visible cell ("<table><tr style='visibility:collapse'><td style='visibility:visible'>abc")
PASS visibility:collapse honored on flex item ("<div style='display:flex'><span style='visibility:collapse'>1</span><span>2</span></div>")
PASS visibility:collapse honored on grid item ("<div style='display:grid'><span style='visibility:collapse'>1</span><span>2</span></div>")
PASS opacity:0 container ("<div style='opacity:0'>abc")
PASS Whitespace compression in opacity:0 container ("<div style='opacity:0'>abc def")
PASS Remove leading/trailing whitespace in opacity:0 container ("<div style='opacity:0'> abc def ")
PASS opacity:0 child rendered ("<div>123<span style='opacity:0'>abc")
PASS Generated content not included ("<div class='before'>")
PASS Generated content on child not included ("<div><div class='before'>")
PASS <button> contents preserved ("<button>abc")
PASS <fieldset> contents preserved ("<fieldset>abc")
PASS <fieldset> <legend> contents preserved ("<fieldset><legend>abc")
PASS <input> contents ignored ("<input type='text' value='abc'>")
PASS <textarea> contents ignored ("<textarea>abc")
PASS <iframe> contents ignored ("<iframe>abc")
PASS <iframe> contents ignored ("<iframe><div id='target'>abc")
PASS <iframe> subdocument ignored ("<iframe src='data:text/html,abc'>")
FAIL <audio> contents ignored ("<audio style='display:block'>abc") assert_equals: expected "" but got "abc"
PASS <audio> contents ok for element not being rendered ("<audio style='display:block'><source id='target' class='poke' style='display:block'>")
PASS <audio> contents ok for element not being rendered ("<audio style='display:block'><source id='target' class='poke' style='display:none'>")
PASS <video> contents ignored ("<video>abc")
PASS <video> contents ok for element not being rendered ("<video style='display:block'><source id='target' class='poke' style='display:block'>")
PASS <video> contents ok for element not being rendered ("<video style='display:block'><source id='target' class='poke' style='display:none'>")
PASS <canvas> contents ignored ("<canvas>abc")
PASS <canvas><div id='target'> contents ok for element not being rendered ("<canvas><div id='target'>abc")
PASS <img> alt text ignored ("<img alt='abc'>")
PASS <img> contents ignored ("<img src='about:blank' class='poke'>")
PASS <select size='1'> contents of options preserved ("<select size='1'><option>abc</option><option>def")
PASS <select size='2'> contents of options preserved ("<select size='2'><option>abc</option><option>def")
PASS <select size='1'> contents of target option preserved ("<select size='1'><option id='target'>abc</option><option>def")
PASS <select size='2'> contents of target option preserved ("<select size='2'><option id='target'>abc</option><option>def")
PASS empty <select> ("<div>a<select></select>bc")
PASS empty <optgroup> in <select> ("<div>a<select><optgroup></select>bc")
PASS empty <option> in <select> ("<div>a<select><option></select>bc")
PASS <select> containing text node child ("<select class='poke'></select>")
PASS <optgroup> containing <optgroup> ("<select><optgroup class='poke-optgroup'></select>")
PASS <optgroup> containing <option> ("<select><optgroup><option>abc</select>")
FAIL <div> in <option> ("<select><option class='poke-div'>123</select>") assert_equals: expected "123\nabc" but got "123abc"
PASS empty <optgroup> in <div> ("<div>a<optgroup></optgroup>bc")
PASS <optgroup> in <div> ("<div>a<optgroup>123</optgroup>bc")
PASS empty <option> in <div> ("<div>a<option></option>bc")
PASS <option> in <div> ("<div>a<option>123</option>bc")
PASS <button> contents preserved ("<div><button>abc")
PASS <fieldset> contents preserved ("<div><fieldset>abc")
PASS <fieldset> <legend> contents preserved ("<div><fieldset><legend>abc")
PASS <input> contents ignored ("<div><input type='text' value='abc'>")
PASS <textarea> contents ignored ("<div><textarea>abc")
PASS <select size='1'> contents of options preserved ("<div><select size='1'><option>abc</option><option>def")
PASS <select size='2'> contents of options preserved ("<div><select size='2'><option>abc</option><option>def")
PASS <iframe> contents ignored ("<div><iframe>abc")
PASS <iframe> subdocument ignored ("<div><iframe src='data:text/html,abc'>")
PASS <audio> contents ignored ("<div><audio>abc")
PASS <video> contents ignored ("<div><video>abc")
PASS <canvas> contents ignored ("<div><canvas>abc")
PASS <img> alt text ignored ("<div><img alt='abc'>")
PASS Newline at block boundary ("<div>123<div>abc</div>def")
PASS Newline at display:block boundary ("<div>123<span style='display:block'>abc</span>def")
PASS Empty block induces single line break ("<div>abc<div></div>def")
PASS Consecutive empty blocks ignored ("<div>abc<div></div><div></div>def")
PASS No blank lines around <p> alone ("<div><p>abc")
PASS No blank lines around <p> followed by only collapsible whitespace ("<div><p>abc</p> ")
PASS No blank lines around <p> preceded by only collapsible whitespace ("<div> <p>abc</p>")
PASS Blank line between consecutive <p>s ("<div><p>abc<p>def")
PASS Blank line between consecutive <p>s separated only by collapsible whitespace ("<div><p>abc</p> <p>def")
PASS Blank line between consecutive <p>s separated only by empty block ("<div><p>abc</p><div></div><p>def")
PASS Blank lines between <p>s separated by non-empty block ("<div><p>abc</p><div>123</div><p>def")
PASS Blank lines around a <p> in its own block ("<div>abc<div><p>123</p></div>def")
PASS Blank line before <p> ("<div>abc<p>def")
PASS Blank line after <p> ("<div><p>abc</p>def")
PASS One blank line between <p>s, ignoring empty <p>s ("<div><p>abc<p></p><p></p><p>def")
PASS Invisible <p> doesn't induce extra line breaks ("<div style='visibility:hidden'><p><span style='visibility:visible'>abc</span></p>\n<div style='visibility:visible'>def</div>")
PASS No blank lines around <div> with margin ("<div>abc<div style='margin:2em'>def")
PASS No newlines at display:inline-block boundary ("<div>123<span style='display:inline-block'>abc</span>def")
PASS Leading/trailing space removal at display:inline-block boundary ("<div>123<span style='display:inline-block'> abc </span>def")
PASS Blank lines around <p> even without margin ("<div>123<p style='margin:0px'>abc</p>def")
PASS No blank lines around <h1> ("<div>123<h1>abc</h1>def")
PASS No blank lines around <h2> ("<div>123<h2>abc</h2>def")
PASS No blank lines around <h3> ("<div>123<h3>abc</h3>def")
PASS No blank lines around <h4> ("<div>123<h4>abc</h4>def")
PASS No blank lines around <h5> ("<div>123<h5>abc</h5>def")
PASS No blank lines around <h6> ("<div>123<h6>abc</h6>def")
PASS <span> boundaries are irrelevant ("<div>123<span>abc</span>def")
PASS <span> boundaries are irrelevant ("<div>123 <span>abc</span> def")
PASS <span> boundaries are irrelevant ("<div style='width:0'>123 <span>abc</span> def")
PASS <em> gets no special treatment ("<div>123<em>abc</em>def")
PASS <b> gets no special treatment ("<div>123<b>abc</b>def")
PASS <i> gets no special treatment ("<div>123<i>abc</i>def")
PASS <strong> gets no special treatment ("<div>123<strong>abc</strong>def")
PASS <tt> gets no special treatment ("<div>123<tt>abc</tt>def")
PASS <code> gets no special treatment ("<div>123<code>abc</code>def")
PASS soft hyphen preserved ("<div>abc&shy;def")
PASS soft hyphen preserved ("<div style='width:0'>abc&shy;def")
PASS Ignoring non-rendered table whitespace ("<div><table style='white-space:pre'> <td>abc</td> </table>")
PASS Tab-separated table cells ("<div><table><tr><td>abc<td>def</table>")
PASS Tab-separated table cells including empty cells ("<div><table><tr><td>abc<td><td>def</table>")
PASS Tab-separated table cells including trailing empty cells ("<div><table><tr><td>abc<td><td></table>")
PASS Newline-separated table rows ("<div><table><tr><td>abc<tr><td>def</table>")
PASS Newlines around table ("<div>abc<table><td>def</table>ghi")
PASS Tab-separated table cells in a border-collapse table ("<div><table style='border-collapse:collapse'><tr><td>abc<td>def</table>")
PASS tfoot not reordered ("<div><table><tfoot>x</tfoot><tbody>y</tbody></table>")
PASS ("<table><tfoot><tr><td>footer</tfoot><thead><tr><td style='visibility:collapse'>thead</thead><tbody><tr><td>tbody</tbody></table>")
PASS Newline between cells and caption ("<div><table><tr><td>abc<caption>def</caption></table>")
PASS Tab-separated table cells ("<div><div class='table'><span class='cell'>abc</span>\n<span class='cell'>def</span></div>")
PASS Newline-separated table rows ("<div><div class='table'><span class='row'><span class='cell'>abc</span></span>\n<span class='row'><span class='cell'>def</span></span></div>")
PASS Newlines around table ("<div>abc<div class='table'><span class='cell'>def</span></div>ghi")
PASS Tab-separated table cells ("<div><div class='itable'><span class='cell'>abc</span>\n<span class='cell'>def</span></div>")
PASS Newline-separated table rows ("<div><div class='itable'><span class='row'><span class='cell'>abc</span></span>\n<span class='row'><span class='cell'>def</span></span></div>")
PASS No newlines around inline-table ("<div>abc<div class='itable'><span class='cell'>def</span></div>ghi")
PASS Single newline in two-row inline-table ("<div>abc<div class='itable'><span class='row'><span class='cell'>def</span></span>\n<span class='row'><span class='cell'>123</span></span></div>ghi")
PASS <ol> list items get no special treatment ("<div><ol><li>abc")
PASS <ul> list items get no special treatment ("<div><ul><li>abc")
PASS display:block <script> is rendered ("<div><script style='display:block'>abc")
PASS display:block <style> is rendered ("<div><style style='display:block'>abc")
PASS display:block <noscript> is not rendered (it's not parsed!) ("<div><noscript style='display:block'>abc")
PASS display:block <template> contents are not rendered (the contents are in a different document) ("<div><template style='display:block'>abc")
PASS <br> induces line break ("<div>abc<br>def")
PASS <br> induces line break even at end of block ("<div>abc<br>")
PASS <br> content ignored ("<div><br class='poke'>")
PASS <hr> induces line break ("<div>abc<hr>def")
PASS <hr><hr> induces just one line break ("<div>abc<hr><hr>def")
PASS <hr><hr><hr> induces just one line break ("<div>abc<hr><hr><hr>def")
PASS <hr> content rendered ("<div><hr class='poke'>")
PASS comment ignored ("<div>abc<!--comment-->def")
PASS text-transform is applied ("<div><div style='text-transform:uppercase'>abc")
PASS text-transform handles es-zet ("<div><div style='text-transform:uppercase'>Maß")
PASS text-transform handles Turkish casing ("<div><div lang='tr' style='text-transform:uppercase'>i ı")
PASS block-in-inline doesn't add unnecessary newlines ("<div>abc<span>123<div>456</div>789</span>def")
PASS floats induce a block boundary ("<div>abc<div style='float:left'>123</div>def")
PASS floats induce a block boundary ("<div>abc<span style='float:left'>123</span>def")
PASS position:absolute induces a block boundary ("<div>abc<div style='position:absolute'>123</div>def")
PASS position:absolute induces a block boundary ("<div>abc<span style='position:absolute'>123</span>def")
PASS position:relative has no effect ("<div>abc<div style='position:relative'>123</div>def")
PASS position:relative has no effect ("<div>abc<span style='position:relative'>123</span>def")
PASS overflow:hidden ignored ("<div style='overflow:hidden'>abc")
PASS overflow:hidden ignored even with zero width ("<div style='width:0; overflow:hidden'>abc")
PASS overflow:hidden ignored even with zero height ("<div style='height:0; overflow:hidden'>abc")
PASS text-overflow:ellipsis ignored ("<div style='width:0; overflow:hidden; text-overflow:ellipsis'>abc")
PASS innerText not supported on SVG elements ("<svg>abc")
PASS innerText not supported on MathML elements ("<math>abc")
PASS <rt> and no <rp> ("<div><ruby>abc<rt>def</rt></ruby>")
PASS <rp> ("<div><ruby>abc<rp>(</rp><rt>def</rt><rp>)</rp></ruby>")
PASS Lone <rp> ("<div><rp>abc</rp>")
PASS visibility:hidden <rp> ("<div><rp style='visibility:hidden'>abc</rp>")
PASS display:block <rp> ("<div><rp style='display:block'>abc</rp>def")
PASS display:block <rp> with whitespace ("<div><rp style='display:block'> abc </rp>def")
PASS <rp> in a <select> ("<div><select class='poke-rp'></select>")
PASS Shadow DOM contents ignored ("<div class='shadow'>")
PASS Shadow DOM contents ignored ("<div><div class='shadow'>")
PASS CSS 'order' property ignored ("<div style='display:flex'><div style='order:1'>1</div><div>2</div></div>")
PASS Flex items blockified ("<div style='display:flex'><span>1</span><span>2</span></div>")
PASS CSS 'order' property ignored ("<div style='display:grid'><div style='order:1'>1</div><div>2</div></div>")
PASS Grid items blockified ("<div style='display:grid'><span>1</span><span>2</span></div>")
Harness: the test ran to completion.