Title: [210751] trunk/LayoutTests/imported/w3c
Revision
210751
Author
cdu...@apple.com
Date
2017-01-13 16:46:12 -0800 (Fri, 13 Jan 2017)

Log Message

Import innerText/ w3c web-platform-tests
https://bugs.webkit.org/show_bug.cgi?id=167024

Reviewed by Alex Christensen.

Import innerText/ w3c web-platform-tests from upstream 4b4b2eeb.

* web-platform-tests/innerText/getter-expected.txt: Added.
* web-platform-tests/innerText/getter-tests.js: Added.
(CSS.supports):
* web-platform-tests/innerText/getter.html: Added.
* web-platform-tests/innerText/setter-expected.txt: Added.
* web-platform-tests/innerText/setter-tests.js: Added.
(string_appeared_here.forEach):
* web-platform-tests/innerText/setter.html: Added.
* web-platform-tests/innerText/w3c-import.log: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (210750 => 210751)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2017-01-14 00:36:53 UTC (rev 210750)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2017-01-14 00:46:12 UTC (rev 210751)
@@ -1,5 +1,24 @@
 2017-01-13  Chris Dumez  <cdu...@apple.com>
 
+        Import innerText/ w3c web-platform-tests
+        https://bugs.webkit.org/show_bug.cgi?id=167024
+
+        Reviewed by Alex Christensen.
+
+        Import innerText/ w3c web-platform-tests from upstream 4b4b2eeb.
+
+        * web-platform-tests/innerText/getter-expected.txt: Added.
+        * web-platform-tests/innerText/getter-tests.js: Added.
+        (CSS.supports):
+        * web-platform-tests/innerText/getter.html: Added.
+        * web-platform-tests/innerText/setter-expected.txt: Added.
+        * web-platform-tests/innerText/setter-tests.js: Added.
+        (string_appeared_here.forEach):
+        * web-platform-tests/innerText/setter.html: Added.
+        * web-platform-tests/innerText/w3c-import.log: Added.
+
+2017-01-13  Chris Dumez  <cdu...@apple.com>
+
         Resync domparsing/ web-platform-tests from upstream
         https://bugs.webkit.org/show_bug.cgi?id=167023
 

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/getter-expected.txt (0 => 210751)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/getter-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/getter-expected.txt	2017-01-14 00:46:12 UTC (rev 210751)
@@ -0,0 +1,207 @@
+1
+2
+
+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") 
+FAIL Trailing whitespace before hard line break removed ("<div>abc <br>def") assert_equals: expected "abc\ndef" but got "abc \ndef"
+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 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") 
+FAIL \n preserved ("<div style='white-space:pre-line'>abc\ndef") assert_equals: expected "abc\ndef" but got "abcdef"
+FAIL \r converted to newline ("<div style='white-space:pre-line'>abc\rdef") assert_equals: expected "abc\ndef" but got "abcdef"
+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") 
+FAIL Whitespace collapses across element boundaries ("<div><span>abc </span><span style='white-space:pre'></span> def") assert_equals: expected "abc def" but got "abc  def"
+PASS Soft line breaks ignored ("<div style='width:0'>abc def") 
+FAIL ::first-line styles applied ("<div class='first-line-uppercase' style='width:0'>abc def") assert_equals: expected "ABC def" but got "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") 
+FAIL non-display-none child of svg ("<div id='target'>abc") assert_equals: expected "" but got "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") 
+FAIL visibility:collapse row-group with visible cell ("<table><tbody style='visibility:collapse'><tr><td style='visibility:visible'>abc") assert_equals: expected "abc" but got "abc\n"
+FAIL visibility:collapse row with visible cell ("<table><tr style='visibility:collapse'><td style='visibility:visible'>abc") assert_equals: expected "abc" but got "abc\n"
+FAIL visibility:collapse honored on flex item ("<div style='display:flex'><span style='visibility:collapse'>1</span><span>2</span></div>") assert_equals: expected "2" but got "2\n"
+FAIL visibility:collapse honored on grid item ("<div style='display:grid'><span style='visibility:collapse'>1</span><span>2</span></div>") assert_equals: expected "2" but got "2\n"
+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") 
+FAIL <fieldset> <legend> contents preserved ("<fieldset><legend>abc") assert_equals: expected "abc" but got "abc\n"
+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=''>") 
+FAIL <audio> contents ignored ("<audio style='display:block'>abc") assert_equals: expected "" but got "abc"
+FAIL <audio> contents ignored ("<audio style='display:block'><source id='target' class='poke' style='display:block'>") assert_equals: expected "" but got "abc"
+PASS <audio> contents ok if display:none ("<audio style='display:block'><source id='target' class='poke' style='display:none'>") 
+PASS <video> contents ignored ("<video>abc") 
+FAIL <video> contents ignored ("<video style='display:block'><source id='target' class='poke' style='display:block'>") assert_equals: expected "" but got "abc"
+PASS <video> contents ok if display:none ("<video style='display:block'><source id='target' class='poke' style='display:none'>") 
+PASS <canvas> contents ignored ("<canvas>abc") 
+FAIL <canvas><div id='target'> contents ignored ("<canvas><div id='target'>abc") assert_equals: expected "" but got "abc"
+PASS <img> alt text ignored ("<img alt='abc'>") 
+PASS <img> contents ignored ("<img src='' class='poke'>") 
+FAIL <select size='1'> contents of options preserved ("<select size='1'><option>abc</option><option>def") assert_equals: expected "abc\ndef" but got ""
+FAIL <select size='2'> contents of options preserved ("<select size='2'><option>abc</option><option>def") assert_equals: expected "abc\ndef" but got ""
+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") 
+FAIL empty <optgroup> in <select> ("<div>a<select><optgroup></select>bc") assert_equals: expected "a\nbc" but got "abc"
+FAIL empty <option> in <select> ("<div>a<select><option></select>bc") assert_equals: expected "a\nbc" but got "abc"
+PASS <select> containing text node child ("<select class='poke'></select>") 
+PASS <optgroup> containing <optgroup> ("<select><optgroup class='poke-optgroup'></select>") 
+FAIL <optgroup> containing <option> ("<select><optgroup><option>abc</select>") assert_equals: expected "abc" but got ""
+FAIL <div> in <option> ("<select><option class='poke-div'>123</select>") assert_equals: expected "123\nabc" but got ""
+FAIL empty <optgroup> in <div> ("<div>a<optgroup></optgroup>bc") assert_equals: expected "a\nbc" but got "abc"
+FAIL <optgroup> in <div> ("<div>a<optgroup>123</optgroup>bc") assert_equals: expected "a\nbc" but got "abc"
+FAIL empty <option> in <div> ("<div>a<option></option>bc") assert_equals: expected "a\nbc" but got "abc"
+FAIL <option> in <div> ("<div>a<option>123</option>bc") assert_equals: expected "a\n123\nbc" but got "abc"
+PASS <button> contents preserved ("<div><button>abc") 
+FAIL <fieldset> contents preserved ("<div><fieldset>abc") assert_equals: expected "abc" but got "abc\n"
+FAIL <fieldset> <legend> contents preserved ("<div><fieldset><legend>abc") assert_equals: expected "abc" but got "abc\n"
+PASS <input> contents ignored ("<div><input type='text' value='abc'>") 
+PASS <textarea> contents ignored ("<div><textarea>abc") 
+FAIL <select size='1'> contents of options preserved ("<div><select size='1'><option>abc</option><option>def") assert_equals: expected "abc\ndef" but got ""
+FAIL <select size='2'> contents of options preserved ("<div><select size='2'><option>abc</option><option>def") assert_equals: expected "abc\ndef" but got ""
+PASS <iframe> contents ignored ("<div><iframe>abc") 
+PASS  <iframe> subdocument ignored ("<div><iframe src=''>") 
+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") 
+FAIL No blank lines around <p> alone ("<div><p>abc") assert_equals: expected "abc" but got "abc\n\n"
+FAIL No blank lines around <p> followed by only collapsible whitespace ("<div><p>abc</p> ") assert_equals: expected "abc" but got "abc\n\n"
+FAIL No blank lines around <p> preceded by only collapsible whitespace ("<div> <p>abc</p>") assert_equals: expected "abc" but got "abc\n\n"
+FAIL Blank line between consecutive <p>s ("<div><p>abc<p>def") assert_equals: expected "abc\n\ndef" but got "abc\n\ndef\n\n"
+FAIL Blank line between consecutive <p>s separated only by collapsible whitespace ("<div><p>abc</p> <p>def") assert_equals: expected "abc\n\ndef" but got "abc\n\ndef\n\n"
+FAIL Blank line between consecutive <p>s separated only by empty block ("<div><p>abc</p><div></div><p>def") assert_equals: expected "abc\n\ndef" but got "abc\n\ndef\n\n"
+FAIL Blank lines between <p>s separated by non-empty block ("<div><p>abc</p><div>123</div><p>def") assert_equals: expected "abc\n\n123\n\ndef" but got "abc\n\n123\ndef\n\n"
+FAIL Blank lines around a <p> in its own block ("<div>abc<div><p>123</p></div>def") assert_equals: expected "abc\n\n123\n\ndef" but got "abc\n123\n\ndef"
+FAIL Blank line before <p> ("<div>abc<p>def") assert_equals: expected "abc\n\ndef" but got "abc\ndef\n\n"
+PASS Blank line after <p> ("<div><p>abc</p>def") 
+FAIL One blank line between <p>s, ignoring empty <p>s ("<div><p>abc<p></p><p></p><p>def") assert_equals: expected "abc\n\ndef" but got "abc\n\ndef\n\n"
+FAIL 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>") assert_equals: expected "abc\ndef" but got "abc\n\ndef\n"
+FAIL No blank lines around <div> with margin ("<div>abc<div style='margin:2em'>def") assert_equals: expected "abc\ndef" but got "abc\ndef\n"
+PASS No newlines at display:inline-block boundary ("<div>123<span style='display:inline-block'>abc</span>def") 
+FAIL Leading/trailing space removal at display:inline-block boundary ("<div>123<span style='display:inline-block'> abc </span>def") assert_equals: expected "123abcdef" but got "123abc 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") 
+FAIL Ignoring non-rendered table whitespace ("<div><table style='white-space:pre'>  <td>abc</td>  </table>") assert_equals: expected "abc" but got "abc\n"
+FAIL Tab-separated table cells ("<div><table><tr><td>abc<td>def</table>") assert_equals: expected "abc\tdef" but got "abc\tdef\n"
+FAIL Tab-separated table cells including empty cells ("<div><table><tr><td>abc<td><td>def</table>") assert_equals: expected "abc\t\tdef" but got "abc\t\tdef\n"
+FAIL Tab-separated table cells including trailing empty cells ("<div><table><tr><td>abc<td><td></table>") assert_equals: expected "abc\t\t" but got "abc\t\t\n"
+FAIL Newline-separated table rows ("<div><table><tr><td>abc<tr><td>def</table>") assert_equals: expected "abc\ndef" but got "abc\ndef\n"
+PASS Newlines around table ("<div>abc<table><td>def</table>ghi") 
+FAIL Tab-separated table cells in a border-collapse table ("<div><table style='border-collapse:collapse'><tr><td>abc<td>def</table>") assert_equals: expected "abc\tdef" but got "abc\tdef\n"
+FAIL tfoot not reordered ("<div><table><tfoot>x</tfoot><tbody>y</tbody></table>") assert_equals: expected "xy" but got "xy\n"
+FAIL  ("<table><tfoot><tr><td>footer</tfoot><thead><tr><td style='visibility:collapse'>thead</thead><tbody><tr><td>tbody</tbody></table>") assert_equals: expected "footer\n\ntbody" but got "footer\ntbody\n"
+FAIL Newline between cells and caption ("<div><table><tr><td>abc<caption>def</caption></table>") assert_equals: expected "abc\ndef" but got "abc\ndef\n"
+FAIL Tab-separated table cells ("<div><div class='table'><span class='cell'>abc</span>\n<span class='cell'>def</span></div>") assert_equals: expected "abc\tdef" but got "abc\tdef\n"
+FAIL 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>") assert_equals: expected "abc\ndef" but got "abc\ndef\n"
+PASS Newlines around table ("<div>abc<div class='table'><span class='cell'>def</span></div>ghi") 
+FAIL Tab-separated table cells ("<div><div class='itable'><span class='cell'>abc</span>\n<span class='cell'>def</span></div>") assert_equals: expected "abc\tdef" but got "abc\tdef \n"
+FAIL 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>") assert_equals: expected "abc\ndef" but got "abc\tdef \n"
+FAIL No newlines around inline-table ("<div>abc<div class='itable'><span class='cell'>def</span></div>ghi") assert_equals: expected "abcdefghi" but got "abc def ghi"
+FAIL 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") assert_equals: expected "abcdef\n123ghi" but got "abc def\t123 ghi"
+FAIL <ol> list items get no special treatment ("<div><ol><li>abc") assert_equals: expected "abc" but got "abc\n"
+FAIL <ul> list items get no special treatment ("<div><ul><li>abc") assert_equals: expected "abc" but got "abc\n"
+FAIL display:block <script> is rendered ("<div><script style='display:block'>abc") assert_equals: expected "abc" but got "abc\n"
+FAIL display:block <style> is rendered ("<div><style style='display:block'>abc") assert_equals: expected "abc" but got "abc\n"
+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") 
+FAIL <hr> content rendered ("<div><hr class='poke'>") assert_equals: expected "abc" but got "abc\n"
+PASS comment ignored ("<div>abc<!--comment-->def") 
+FAIL text-transform is applied ("<div><div style='text-transform:uppercase'>abc") assert_equals: expected "ABC" but got "ABC\n"
+FAIL text-transform handles es-zet ("<div><div style='text-transform:uppercase'>Maß") assert_equals: expected "MASS" but got "MASS\n"
+FAIL text-transform handles Turkish casing ("<div><div lang='tr' style='text-transform:uppercase'>i ı") assert_equals: expected "İ I" but got "İ I\n"
+PASS block-in-inline doesn't add unnecessary newlines ("<div>abc<span>123<div>456</div>789</span>def") 
+FAIL floats induce a block boundary ("<div>abc<div style='float:left'>123</div>def") assert_equals: expected "abc\n123\ndef" but got "abc123def"
+FAIL floats induce a block boundary ("<div>abc<span style='float:left'>123</span>def") assert_equals: expected "abc\n123\ndef" but got "abc123def"
+FAIL position:absolute induces a block boundary ("<div>abc<div style='position:absolute'>123</div>def") assert_equals: expected "abc\n123\ndef" but got "abc123def"
+FAIL position:absolute induces a block boundary ("<div>abc<span style='position:absolute'>123</span>def") assert_equals: expected "abc\n123\ndef" but got "abc123def"
+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") 
+FAIL overflow:hidden ignored even with zero width ("<div style='width:0; overflow:hidden'>abc") assert_equals: expected "abc" but got ""
+FAIL overflow:hidden ignored even with zero height ("<div style='height:0; overflow:hidden'>abc") assert_equals: expected "abc" but got ""
+FAIL text-overflow:ellipsis ignored ("<div style='width:0; overflow:hidden; text-overflow:ellipsis'>abc") assert_equals: expected "abc" but got ""
+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>") 
+FAIL <rp> ("<div><ruby>abc<rp>(</rp><rt>def</rt><rp>)</rp></ruby>") assert_equals: expected "abcdef" but got "abcdef\n"
+FAIL Lone <rp> ("<div><rp>abc</rp>") assert_equals: expected "" but got "abc"
+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>") 
+FAIL CSS 'order' property ignored ("<div style='display:flex'><div style='order:1'>1</div><div>2</div></div>") assert_equals: expected "1\n2" but got "1\n2\n"
+FAIL Flex items blockified ("<div style='display:flex'><span>1</span><span>2</span></div>") assert_equals: expected "1\n2" but got "1\n2\n"
+FAIL CSS 'order' property ignored ("<div style='display:grid'><div style='order:1'>1</div><div>2</div></div>") assert_equals: expected "1\n2" but got "1\n2\n"
+FAIL Grid items blockified ("<div style='display:grid'><span>1</span><span>2</span></div>") assert_equals: expected "1\n2" but got "1\n2\n"
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/getter-tests.js (0 => 210751)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/getter-tests.js	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/getter-tests.js	2017-01-14 00:46:12 UTC (rev 210751)
@@ -0,0 +1,342 @@
+testText("<div>abc", "abc", "Simplest possible test");
+
+/**** white-space:normal ****/
+
+testText("<div> abc", "abc", "Leading whitespace removed");
+testText("<div>abc ", "abc", "Trailing whitespace removed");
+testText("<div>abc  def", "abc def", "Internal whitespace compressed");
+testText("<div>abc\ndef", "abc def", "\\n converted to space");
+testText("<div>abc\rdef", "abc def", "\\r converted to space");
+testText("<div>abc\tdef", "abc def", "\\t converted to space");
+testText("<div>abc <br>def", "abc\ndef", "Trailing whitespace before hard line break removed");
+
+/**** <pre> ****/
+
+testText("<pre> abc", " abc", "Leading whitespace preserved");
+testText("<pre>abc ", "abc ", "Trailing whitespace preserved");
+testText("<pre>abc  def", "abc  def", "Internal whitespace preserved");
+testText("<pre>abc\ndef", "abc\ndef", "\\n preserved");
+testText("<pre>abc\rdef", "abc\ndef", "\\r converted to newline");
+testText("<pre>abc\tdef", "abc\tdef", "\\t preserved");
+
+/**** <div style="white-space:pre"> ****/
+
+testText("<div style='white-space:pre'> abc", " abc", "Leading whitespace preserved");
+testText("<div style='white-space:pre'>abc ", "abc ", "Trailing whitespace preserved");
+testText("<div style='white-space:pre'>abc  def", "abc  def", "Internal whitespace preserved");
+testText("<div style='white-space:pre'>abc\ndef", "abc\ndef", "\\n preserved");
+testText("<div style='white-space:pre'>abc\rdef", "abc\ndef", "\\r converted to newline");
+testText("<div style='white-space:pre'>abc\tdef", "abc\tdef", "\\t preserved");
+
+/**** <span style="white-space:pre"> ****/
+
+testText("<span style='white-space:pre'> abc", " abc", "Leading whitespace preserved");
+testText("<span style='white-space:pre'>abc ", "abc ", "Trailing whitespace preserved");
+testText("<span style='white-space:pre'>abc  def", "abc  def", "Internal whitespace preserved");
+testText("<span style='white-space:pre'>abc\ndef", "abc\ndef", "\\n preserved");
+testText("<span style='white-space:pre'>abc\rdef", "abc\ndef", "\\r converted to newline");
+testText("<span style='white-space:pre'>abc\tdef", "abc\tdef", "\\t preserved");
+
+/**** <div style="white-space:pre-line"> ****/
+
+testText("<div style='white-space:pre-line'> abc", "abc", "Leading whitespace removed");
+testText("<div style='white-space:pre-line'>abc ", "abc", "Trailing whitespace removed");
+testText("<div style='white-space:pre-line'>abc  def", "abc def", "Internal whitespace collapsed");
+testText("<div style='white-space:pre-line'>abc\ndef", "abc\ndef", "\\n preserved");
+testText("<div style='white-space:pre-line'>abc\rdef", "abc\ndef", "\\r converted to newline");
+testText("<div style='white-space:pre-line'>abc\tdef", "abc def", "\\t converted to space");
+
+/**** Collapsing whitespace across element boundaries ****/
+
+testText("<div><span>abc </span> def", "abc def", "Whitespace collapses across element boundaries");
+testText("<div><span>abc </span><span></span> def", "abc def", "Whitespace collapses across element boundaries");
+testText("<div><span>abc </span><span style='white-space:pre'></span> def", "abc def", "Whitespace collapses across element boundaries");
+
+/**** Soft line breaks ****/
+
+testText("<div style='width:0'>abc def", "abc def", "Soft line breaks ignored");
+
+/**** first-line/first-letter ****/
+
+testText("<div class='first-line-uppercase' style='width:0'>abc def", "ABC def", "::first-line styles applied");
+testText("<div class='first-letter-uppercase' style='width:0'>abc def", "Abc def", "::first-letter styles applied");
+testText("<div class='first-letter-float' style='width:0'>abc def", "abc def", "::first-letter float ignored");
+
+/**** &nbsp; ****/
+
+testText("<div>&nbsp;", "\xA0", "&nbsp; preserved");
+
+/**** display:none ****/
+
+testText("<div style='display:none'>abc", "abc", "display:none container");
+testText("<div style='display:none'>abc  def", "abc  def", "No whitespace compression in display:none container");
+testText("<div style='display:none'> abc def ", " abc def ", "No removal of leading/trailing whitespace in display:none container");
+testText("<div>123<span style='display:none'>abc", "123", "display:none child not rendered");
+testText("<div style='display:none'><span id='target'>abc", "abc", "display:none container with non-display-none target child");
+testTextInSVG("<div id='target'>abc", "", "non-display-none child of svg");
+testTextInSVG("<div style='display:none' id='target'>abc", "abc", "display:none child of svg");
+testTextInSVG("<div style='display:none'><div id='target'>abc", "abc", "child of display:none child of svg");
+
+/**** display:contents ****/
+
+if (CSS.supports("display", "contents")) {
+  testText("<div style='display:contents'>abc", "abc", "display:contents container");
+  testText("<div><div style='display:contents'>abc", "abc", "display:contents container");
+  testText("<div>123<span style='display:contents'>abc", "123abc", "display:contents rendered");
+  testText("<div style='display:contents'>   ", "", "display:contents not processed via textContent");
+  testText("<div><div style='display:contents'>   ", "", "display:contents not processed via textContent");
+}
+
+/**** visibility:hidden ****/
+
+testText("<div style='visibility:hidden'>abc", "", "visibility:hidden container");
+testText("<div>123<span style='visibility:hidden'>abc", "123", "visibility:hidden child not rendered");
+testText("<div style='visibility:hidden'>123<span style='visibility:visible'>abc", "abc", "visibility:visible child rendered");
+
+/**** visibility:collapse ****/
+
+testText("<table><tbody style='visibility:collapse'><tr><td>abc", "", "visibility:collapse row-group");
+testText("<table><tr style='visibility:collapse'><td>abc", "", "visibility:collapse row");
+testText("<table><tr><td style='visibility:collapse'>abc", "", "visibility:collapse cell");
+testText("<table><tbody style='visibility:collapse'><tr><td style='visibility:visible'>abc", "abc",
+         "visibility:collapse row-group with visible cell");
+testText("<table><tr style='visibility:collapse'><td style='visibility:visible'>abc", "abc",
+         "visibility:collapse row with visible cell");
+testText("<div style='display:flex'><span style='visibility:collapse'>1</span><span>2</span></div>",
+         "2", "visibility:collapse honored on flex item");
+testText("<div style='display:grid'><span style='visibility:collapse'>1</span><span>2</span></div>",
+         "2", "visibility:collapse honored on grid item");
+
+/**** opacity:0 ****/
+
+testText("<div style='opacity:0'>abc", "abc", "opacity:0 container");
+testText("<div style='opacity:0'>abc  def", "abc def", "Whitespace compression in opacity:0 container");
+testText("<div style='opacity:0'> abc def ", "abc def", "Remove leading/trailing whitespace in opacity:0 container");
+testText("<div>123<span style='opacity:0'>abc", "123abc", "opacity:0 child rendered");
+
+/**** generated content ****/
+
+testText("<div class='before'>", "", "Generated content not included");
+testText("<div><div class='before'>", "", "Generated content on child not included");
+
+/**** innerText on replaced elements ****/
+
+testText("<button>abc", "abc", "<button> contents preserved");
+testText("<fieldset>abc", "abc", "<fieldset> contents preserved");
+testText("<fieldset><legend>abc", "abc", "<fieldset> <legend> contents preserved");
+testText("<input type='text' value='abc'>", "", "<input> contents ignored");
+testText("<textarea>abc", "", "<textarea> contents ignored");
+testText("<iframe>abc", "", "<iframe> contents ignored");
+testText("<iframe><div id='target'>abc", "", "<iframe> contents ignored");
+testText("<iframe src=''>", "","<iframe> subdocument ignored");
+testText("<audio style='display:block'>abc", "", "<audio> contents ignored");
+testText("<audio style='display:block'><source id='target' class='poke' style='display:block'>", "", "<audio> contents ignored");
+testText("<audio style='display:block'><source id='target' class='poke' style='display:none'>", "abc", "<audio> contents ok if display:none");
+testText("<video>abc", "", "<video> contents ignored");
+testText("<video style='display:block'><source id='target' class='poke' style='display:block'>", "", "<video> contents ignored");
+testText("<video style='display:block'><source id='target' class='poke' style='display:none'>", "abc", "<video> contents ok if display:none");
+testText("<canvas>abc", "", "<canvas> contents ignored");
+testText("<canvas><div id='target'>abc", "", "<canvas><div id='target'> contents ignored");
+testText("<img alt='abc'>", "", "<img> alt text ignored");
+testText("<img src='' class='poke'>", "", "<img> contents ignored");
+
+/**** <select>, <optgroup> & <option> ****/
+
+testText("<select size='1'><option>abc</option><option>def", "abc\ndef", "<select size='1'> contents of options preserved");
+testText("<select size='2'><option>abc</option><option>def", "abc\ndef", "<select size='2'> contents of options preserved");
+testText("<select size='1'><option id='target'>abc</option><option>def", "abc", "<select size='1'> contents of target option preserved");
+testText("<select size='2'><option id='target'>abc</option><option>def", "abc", "<select size='2'> contents of target option preserved");
+testText("<div>a<select></select>bc", "abc", "empty <select>");
+testText("<div>a<select><optgroup></select>bc", "a\nbc", "empty <optgroup> in <select>");
+testText("<div>a<select><option></select>bc", "a\nbc", "empty <option> in <select>");
+testText("<select class='poke'></select>", "", "<select> containing text node child");
+testText("<select><optgroup class='poke-optgroup'></select>", "", "<optgroup> containing <optgroup>");
+testText("<select><optgroup><option>abc</select>", "abc", "<optgroup> containing <option>");
+testText("<select><option class='poke-div'>123</select>", "123\nabc", "<div> in <option>");
+testText("<div>a<optgroup></optgroup>bc", "a\nbc", "empty <optgroup> in <div>");
+testText("<div>a<optgroup>123</optgroup>bc", "a\nbc", "<optgroup> in <div>");
+testText("<div>a<option></option>bc", "a\nbc", "empty <option> in <div>");
+testText("<div>a<option>123</option>bc", "a\n123\nbc", "<option> in <div>");
+
+/**** innerText on replaced element children ****/
+
+testText("<div><button>abc", "abc", "<button> contents preserved");
+testText("<div><fieldset>abc", "abc", "<fieldset> contents preserved");
+testText("<div><fieldset><legend>abc", "abc", "<fieldset> <legend> contents preserved");
+testText("<div><input type='text' value='abc'>", "", "<input> contents ignored");
+testText("<div><textarea>abc", "", "<textarea> contents ignored");
+testText("<div><select size='1'><option>abc</option><option>def", "abc\ndef", "<select size='1'> contents of options preserved");
+testText("<div><select size='2'><option>abc</option><option>def", "abc\ndef", "<select size='2'> contents of options preserved");
+testText("<div><iframe>abc", "", "<iframe> contents ignored");
+testText("<div><iframe src=''>", ""," <iframe> subdocument ignored");
+testText("<div><audio>abc", "", "<audio> contents ignored");
+testText("<div><video>abc", "", "<video> contents ignored");
+testText("<div><canvas>abc", "", "<canvas> contents ignored");
+testText("<div><img alt='abc'>", "", "<img> alt text ignored");
+
+/**** Lines around blocks ****/
+
+testText("<div>123<div>abc</div>def", "123\nabc\ndef", "Newline at block boundary");
+testText("<div>123<span style='display:block'>abc</span>def", "123\nabc\ndef", "Newline at display:block boundary");
+testText("<div>abc<div></div>def", "abc\ndef", "Empty block induces single line break");
+testText("<div>abc<div></div><div></div>def", "abc\ndef", "Consecutive empty blocks ignored");
+testText("<div><p>abc", "abc", "No blank lines around <p> alone");
+testText("<div><p>abc</p> ", "abc", "No blank lines around <p> followed by only collapsible whitespace");
+testText("<div> <p>abc</p>", "abc", "No blank lines around <p> preceded by only collapsible whitespace");
+testText("<div><p>abc<p>def", "abc\n\ndef", "Blank line between consecutive <p>s");
+testText("<div><p>abc</p> <p>def", "abc\n\ndef", "Blank line between consecutive <p>s separated only by collapsible whitespace");
+testText("<div><p>abc</p><div></div><p>def", "abc\n\ndef", "Blank line between consecutive <p>s separated only by empty block");
+testText("<div><p>abc</p><div>123</div><p>def", "abc\n\n123\n\ndef", "Blank lines between <p>s separated by non-empty block");
+testText("<div>abc<div><p>123</p></div>def", "abc\n\n123\n\ndef", "Blank lines around a <p> in its own block");
+testText("<div>abc<p>def", "abc\n\ndef", "Blank line before <p>");
+testText("<div><p>abc</p>def", "abc\n\ndef", "Blank line after <p>");
+testText("<div><p>abc<p></p><p></p><p>def", "abc\n\ndef", "One blank line between <p>s, ignoring empty <p>s");
+testText("<div style='visibility:hidden'><p><span style='visibility:visible'>abc</span></p>\n<div style='visibility:visible'>def</div>",
+     "abc\ndef", "Invisible <p> doesn't induce extra line breaks");
+testText("<div>abc<div style='margin:2em'>def", "abc\ndef", "No blank lines around <div> with margin");
+testText("<div>123<span style='display:inline-block'>abc</span>def", "123abcdef", "No newlines at display:inline-block boundary");
+testText("<div>123<span style='display:inline-block'> abc </span>def", "123abcdef", "Leading/trailing space removal at display:inline-block boundary");
+
+/**** Spans ****/
+
+testText("<div>123<span>abc</span>def", "123abcdef", "<span> boundaries are irrelevant");
+testText("<div>123 <span>abc</span> def", "123 abc def", "<span> boundaries are irrelevant");
+testText("<div style='width:0'>123 <span>abc</span> def", "123 abc def", "<span> boundaries are irrelevant");
+testText("<div>123<em>abc</em>def", "123abcdef", "<em> gets no special treatment");
+testText("<div>123<b>abc</b>def", "123abcdef", "<b> gets no special treatment");
+testText("<div>123<i>abc</i>def", "123abcdef", "<i> gets no special treatment");
+testText("<div>123<strong>abc</strong>def", "123abcdef", "<strong> gets no special treatment");
+testText("<div>123<tt>abc</tt>def", "123abcdef", "<tt> gets no special treatment");
+testText("<div>123<code>abc</code>def", "123abcdef", "<code> gets no special treatment");
+
+/**** Soft hyphen ****/
+
+testText("<div>abc&shy;def", "abc\xADdef", "soft hyphen preserved");
+testText("<div style='width:0'>abc&shy;def", "abc\xADdef", "soft hyphen preserved");
+
+/**** Tables ****/
+
+testText("<div><table style='white-space:pre'>  <td>abc</td>  </table>", "abc", "Ignoring non-rendered table whitespace");
+testText("<div><table><tr><td>abc<td>def</table>", "abc\tdef", "Tab-separated table cells");
+testText("<div><table><tr><td>abc<td><td>def</table>", "abc\t\tdef", "Tab-separated table cells including empty cells");
+testText("<div><table><tr><td>abc<td><td></table>", "abc\t\t", "Tab-separated table cells including trailing empty cells");
+testText("<div><table><tr><td>abc<tr><td>def</table>", "abc\ndef", "Newline-separated table rows");
+testText("<div>abc<table><td>def</table>ghi", "abc\ndef\nghi", "Newlines around table");
+testText("<div><table style='border-collapse:collapse'><tr><td>abc<td>def</table>", "abc\tdef",
+         "Tab-separated table cells in a border-collapse table");
+testText("<div><table><tfoot>x</tfoot><tbody>y</tbody></table>", "xy", "tfoot not reordered");
+testText("<table><tfoot><tr><td>footer</tfoot><thead><tr><td style='visibility:collapse'>thead</thead><tbody><tr><td>tbody</tbody></table>",
+         "footer\n\ntbody", "");
+
+/**** Table captions ****/
+
+testText("<div><table><tr><td>abc<caption>def</caption></table>", "abc\ndef", "Newline between cells and caption");
+
+/**** display:table ****/
+
+testText("<div><div class='table'><span class='cell'>abc</span>\n<span class='cell'>def</span></div>",
+         "abc\tdef", "Tab-separated table cells");
+testText("<div><div class='table'><span class='row'><span class='cell'>abc</span></span>\n<span class='row'><span class='cell'>def</span></span></div>",
+         "abc\ndef", "Newline-separated table rows");
+testText("<div>abc<div class='table'><span class='cell'>def</span></div>ghi", "abc\ndef\nghi", "Newlines around table");
+
+/**** display:inline-table ****/
+
+testText("<div><div class='itable'><span class='cell'>abc</span>\n<span class='cell'>def</span></div>", "abc\tdef", "Tab-separated table cells");
+testText("<div><div class='itable'><span class='row'><span class='cell'>abc</span></span>\n<span class='row'><span class='cell'>def</span></span></div>",
+         "abc\ndef", "Newline-separated table rows");
+testText("<div>abc<div class='itable'><span class='cell'>def</span></div>ghi", "abcdefghi", "No newlines around inline-table");
+testText("<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",
+         "abcdef\n123ghi", "Single newline in two-row inline-table");
+
+/**** Lists ****/
+
+testText("<div><ol><li>abc", "abc", "<ol> list items get no special treatment");
+testText("<div><ul><li>abc", "abc", "<ul> list items get no special treatment");
+
+/**** Misc elements ****/
+
+testText("<div><script style='display:block'>abc", "abc", "display:block <script> is rendered");
+testText("<div><style style='display:block'>abc", "abc", "display:block <style> is rendered");
+testText("<div><noscript style='display:block'>abc", "", "display:block <noscript> is not rendered (it's not parsed!)");
+testText("<div><template style='display:block'>abc", "",
+         "display:block <template> contents are not rendered (the contents are in a different document)");
+testText("<div>abc<br>def", "abc\ndef", "<br> induces line break");
+testText("<div>abc<br>", "abc\n", "<br> induces line break even at end of block");
+testText("<div><br class='poke'>", "\n", "<br> content ignored");
+testText("<div>abc<hr>def", "abc\ndef", "<hr> induces line break");
+testText("<div>abc<hr><hr>def", "abc\ndef", "<hr><hr> induces just one line break");
+testText("<div>abc<hr><hr><hr>def", "abc\ndef", "<hr><hr><hr> induces just one line break");
+testText("<div><hr class='poke'>", "abc", "<hr> content rendered");
+testText("<div>abc<!--comment-->def", "abcdef", "comment ignored");
+
+/**** text-transform ****/
+
+testText("<div><div style='text-transform:uppercase'>abc", "ABC", "text-transform is applied");
+testText("<div><div style='text-transform:uppercase'>Ma\xDF", "MASS", "text-transform handles es-zet");
+testText("<div><div lang='tr' style='text-transform:uppercase'>i \u0131", "\u0130 I", "text-transform handles Turkish casing");
+
+/**** block-in-inline ****/
+
+testText("<div>abc<span>123<div>456</div>789</span>def", "abc123\n456\n789def", "block-in-inline doesn't add unnecessary newlines");
+
+/**** floats ****/
+
+testText("<div>abc<div style='float:left'>123</div>def", "abc\n123\ndef", "floats induce a block boundary");
+testText("<div>abc<span style='float:left'>123</span>def", "abc\n123\ndef", "floats induce a block boundary");
+
+/**** position ****/
+
+testText("<div>abc<div style='position:absolute'>123</div>def", "abc\n123\ndef", "position:absolute induces a block boundary");
+testText("<div>abc<span style='position:absolute'>123</span>def", "abc\n123\ndef", "position:absolute induces a block boundary");
+testText("<div>abc<div style='position:relative'>123</div>def", "abc\n123\ndef", "position:relative has no effect");
+testText("<div>abc<span style='position:relative'>123</span>def", "abc123def", "position:relative has no effect");
+
+/**** text-overflow:ellipsis ****/
+
+testText("<div style='overflow:hidden'>abc", "abc", "overflow:hidden ignored");
+// XXX Chrome skips content with width:0 or height:0 and overflow:hidden;
+// should we spec that?
+testText("<div style='width:0; overflow:hidden'>abc", "abc", "overflow:hidden ignored even with zero width");
+testText("<div style='height:0; overflow:hidden'>abc", "abc", "overflow:hidden ignored even with zero height");
+testText("<div style='width:0; overflow:hidden; text-overflow:ellipsis'>abc", "abc", "text-overflow:ellipsis ignored");
+
+/**** Support on non-HTML elements ****/
+
+testText("<svg>abc", undefined, "innerText not supported on SVG elements");
+testText("<math>abc", undefined, "innerText not supported on MathML elements");
+
+/**** Ruby ****/
+
+testText("<div><ruby>abc<rt>def</rt></ruby>", "abcdef", "<rt> and no <rp>");
+testText("<div><ruby>abc<rp>(</rp><rt>def</rt><rp>)</rp></ruby>", "abcdef", "<rp>");
+testText("<div><rp>abc</rp>", "", "Lone <rp>");
+testText("<div><rp style='visibility:hidden'>abc</rp>", "", "visibility:hidden <rp>");
+testText("<div><rp style='display:block'>abc</rp>def", "abc\ndef", "display:block <rp>");
+testText("<div><rp style='display:block'> abc </rp>def", "abc\ndef", "display:block <rp> with whitespace");
+testText("<div><select class='poke-rp'></select>", "", "<rp> in a <select>");
+
+/**** Shadow DOM ****/
+
+if ("createShadowRoot" in document.body) {
+  testText("<div class='shadow'>", "", "Shadow DOM contents ignored");
+  testText("<div><div class='shadow'>", "", "Shadow DOM contents ignored");
+}
+
+/**** Flexbox ****/
+
+if (CSS.supports('display', 'flex')) {
+  testText("<div style='display:flex'><div style='order:1'>1</div><div>2</div></div>",
+           "1\n2", "CSS 'order' property ignored");
+  testText("<div style='display:flex'><span>1</span><span>2</span></div>",
+           "1\n2", "Flex items blockified");
+}
+
+/**** Grid ****/
+
+if (CSS.supports('display', 'grid')) {
+  testText("<div style='display:grid'><div style='order:1'>1</div><div>2</div></div>",
+           "1\n2", "CSS 'order' property ignored");
+  testText("<div style='display:grid'><span>1</span><span>2</span></div>",
+           "1\n2", "Grid items blockified");
+}

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/getter.html (0 => 210751)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/getter.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/getter.html	2017-01-14 00:46:12 UTC (rev 210751)
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<title>innerText getter test</title>
+<script src=""
+<script src=""
+<style>
+.before::before { content:'abc'; }
+.table { display:table; }
+.itable { display:inline-table; }
+.row { display:table-row; }
+.cell { display:table-cell; }
+.first-line-uppercase::first-line { text-transform:uppercase; }
+.first-letter-uppercase::first-letter { text-transform:uppercase; }
+.first-letter-float::first-letter { float:left; }
+</style>
+<div id="container"></div>
+<svg id="svgContainer"></svg>
+<script>
+function testText(html, expectedPlain, msg) {
+  textTextInContainer(container, html, expectedPlain, msg);
+}
+function testTextInSVG(html, expectedPlain, msg) {
+  textTextInContainer(svgContainer, html, expectedPlain, msg);
+}
+function textTextInContainer(cont, html, expectedPlain, msg) {
+  test(function() {
+    container.innerHTML = html;
+    if (cont != container) {
+      while (container.firstChild) {
+        cont.appendChild(container.firstChild);
+      }
+    }
+    var e = document.getElementById('target');
+    if (!e) {
+      e = cont.firstChild;
+    }
+    var pokes = document.getElementsByClassName('poke');
+    for (var i = 0; i < pokes.length; ++i) {
+      pokes[i].textContent = 'abc';
+    }
+    ['rp', 'optgroup', 'div'].forEach(function(tag) {
+      pokes = document.getElementsByClassName('poke-' + tag);
+      for (var i = 0; i < pokes.length; ++i) {
+        var el = document.createElement(tag);
+        el.textContent = "abc";
+        pokes[i].appendChild(el);
+      }
+    });
+    var shadows = document.getElementsByClassName('shadow');
+    for (var i = 0; i < shadows.length; ++i) {
+      var s = shadows[i].createShadowRoot();
+      s.textContent = 'abc';
+    }
+    while (e && e.nodeType != Node.ELEMENT_NODE) {
+      e = e.nextSibling;
+    }
+    assert_equals(e.innerText, expectedPlain);
+    cont.textContent = '';
+  }, msg + ' (' + format_value(html) + ')');
+}
+</script>
+<script src=""

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/setter-expected.txt (0 => 210751)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/setter-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/setter-expected.txt	2017-01-14 00:46:12 UTC (rev 210751)
@@ -0,0 +1,58 @@
+
+PASS Simplest possible test 
+PASS Newlines convert to <br> in non-white-space:pre elements 
+PASS Newlines convert to <br> in <pre> element 
+PASS Newlines convert to <br> in white-space:pre element 
+PASS CRs convert to <br> in non-white-space:pre elements 
+PASS CRs convert to <br> in <pre> element 
+PASS Newline/CR pair converts to <br> in non-white-space:pre element 
+PASS Newline/newline pair converts to two <br>s in non-white-space:pre element 
+PASS CR/CR pair converts to two <br>s in non-white-space:pre element 
+PASS CRs convert to <br> in white-space:pre element 
+PASS < preserved 
+PASS > preserved 
+PASS & preserved 
+PASS " preserved 
+PASS ' preserved 
+PASS innerText not supported on SVG elements 
+PASS innerText not supported on MathML elements 
+PASS Null characters preserved 
+PASS Tabs preserved 
+PASS Leading whitespace preserved 
+PASS Trailing whitespace preserved 
+PASS Whitespace not compressed 
+PASS Existing text deleted 
+PASS Existing <br> deleted 
+PASS Assigning the empty string 
+PASS Assigning null 
+PASS Assigning undefined 
+FAIL innerText on <area> element The object can not be modified.
+FAIL innerText on <base> element The object can not be modified.
+FAIL innerText on <basefont> element The object can not be modified.
+PASS innerText on <bgsound> element 
+FAIL innerText on <br> element The object can not be modified.
+FAIL innerText on <col> element The object can not be modified.
+FAIL innerText on <embed> element The object can not be modified.
+FAIL innerText on <frame> element The object can not be modified.
+FAIL innerText on <hr> element The object can not be modified.
+FAIL innerText on <image> element The object can not be modified.
+FAIL innerText on <img> element The object can not be modified.
+FAIL innerText on <input> element The object can not be modified.
+PASS innerText on <keygen> element 
+FAIL innerText on <link> element The object can not be modified.
+PASS innerText on <menuitem> element 
+FAIL innerText on <meta> element The object can not be modified.
+FAIL innerText on <param> element The object can not be modified.
+FAIL innerText on <source> element The object can not be modified.
+PASS innerText on <track> element 
+FAIL innerText on <wbr> element The object can not be modified.
+FAIL innerText on <colgroup> element The object can not be modified.
+FAIL innerText on <frameset> element The object can not be modified.
+FAIL innerText on <head> element The object can not be modified.
+FAIL innerText on <html> element The object can not be modified.
+FAIL innerText on <table> element The object can not be modified.
+FAIL innerText on <tbody> element The object can not be modified.
+FAIL innerText on <tfoot> element The object can not be modified.
+FAIL innerText on <thead> element The object can not be modified.
+FAIL innerText on <tr> element The object can not be modified.
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/setter-tests.js (0 => 210751)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/setter-tests.js	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/setter-tests.js	2017-01-14 00:46:12 UTC (rev 210751)
@@ -0,0 +1,35 @@
+testText("<div>", "abc", "abc", "Simplest possible test");
+testHTML("<div>", "abc\ndef", "abc<br>def", "Newlines convert to <br> in non-white-space:pre elements");
+testHTML("<pre>", "abc\ndef", "abc<br>def", "Newlines convert to <br> in <pre> element");
+testHTML("<div style='white-space:pre'>", "abc\ndef", "abc<br>def", "Newlines convert to <br> in white-space:pre element");
+testHTML("<div>", "abc\rdef", "abc<br>def", "CRs convert to <br> in non-white-space:pre elements");
+testHTML("<pre>", "abc\rdef", "abc<br>def", "CRs convert to <br> in <pre> element");
+testHTML("<div>", "abc\r\ndef", "abc<br>def", "Newline/CR pair converts to <br> in non-white-space:pre element");
+testHTML("<div>", "abc\n\ndef", "abc<br><br>def", "Newline/newline pair converts to two <br>s in non-white-space:pre element");
+testHTML("<div>", "abc\r\rdef", "abc<br><br>def", "CR/CR pair converts to two <br>s in non-white-space:pre element");
+testHTML("<div style='white-space:pre'>", "abc\rdef", "abc<br>def", "CRs convert to <br> in white-space:pre element");
+testText("<div>", "abc<def", "abc<def", "< preserved");
+testText("<div>", "abc>def", "abc>def", "> preserved");
+testText("<div>", "abc&", "abc&", "& preserved");
+testText("<div>", "abc\"def", "abc\"def", "\" preserved");
+testText("<div>", "abc\'def", "abc\'def", "\' preserved");
+testHTML("<svg>", "abc", "", "innerText not supported on SVG elements");
+testHTML("<math>", "abc", "", "innerText not supported on MathML elements");
+testText("<div>", "abc\0def", "abc\0def", "Null characters preserved");
+testText("<div>", "abc\tdef", "abc\tdef", "Tabs preserved");
+testText("<div>", " abc", " abc", "Leading whitespace preserved");
+testText("<div>", "abc ", "abc ", "Trailing whitespace preserved");
+testText("<div>", "abc  def", "abc  def", "Whitespace not compressed");
+testHTML("<div>abc\n\n", "abc", "abc", "Existing text deleted");
+testHTML("<div><br>", "abc", "abc", "Existing <br> deleted");
+testHTML("<div>", "", "", "Assigning the empty string");
+testHTML("<div>", null, "", "Assigning null");
+testHTML("<div>", undefined, "undefined", "Assigning undefined");
+
+// Setting innerText on these should not throw
+["area", "base", "basefont", "bgsound", "br", "col", "embed", "frame", "hr",
+"image", "img", "input", "keygen", "link", "menuitem", "meta", "param",
+"source", "track", "wbr", "colgroup", "frameset", "head", "html", "table",
+"tbody", "tfoot", "thead", "tr"].forEach(function(tag) {
+  testText(document.createElement(tag), "abc", "abc", "innerText on <" + tag + "> element");
+});

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/setter.html (0 => 210751)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/setter.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/setter.html	2017-01-14 00:46:12 UTC (rev 210751)
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>innerText setter test</title>
+<script src=""
+<script src=""
+<div id="container"></div>
+<script>
+function setupTest(context, plain) {
+  // context is either a string or an element node
+  if (typeof context === "string") {
+    container.innerHTML = context;
+  } else {
+    container.innerHTML = "";
+    container.appendChild(context);
+  }
+  var e = container.firstChild;
+  while (e && e.nodeType != Node.ELEMENT_NODE) {
+    e = e.nextSibling;
+  }
+  e.innerText = plain;
+  return e;
+}
+function testText(context, plain, expectedText, msg) {
+  test(function(){
+    var e = setupTest(context, plain);
+    assert_not_equals(e.firstChild, null, "Should have a child");
+    assert_equals(e.firstChild.nodeType, Node.TEXT_NODE, "Child should be a text node");
+    assert_equals(e.firstChild.nextSibling, null, "Should have only one child");
+    assert_equals(e.firstChild.data, expectedText);
+  }, msg);
+}
+function testHTML(context, plain, expectedHTML, msg) {
+  test(function(){
+    var e = setupTest(context, plain);
+    assert_equals(e.innerHTML, expectedHTML);
+  }, msg);
+}
+</script>
+<script src=""

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/w3c-import.log (0 => 210751)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/w3c-import.log	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/innerText/w3c-import.log	2017-01-14 00:46:12 UTC (rev 210751)
@@ -0,0 +1,21 @@
+The tests in this directory were imported from the W3C repository.
+Do NOT modify these tests directly in WebKit.
+Instead, create a pull request on the W3C CSS or WPT github:
+	https://github.com/w3c/csswg-test
+	https://github.com/w3c/web-platform-tests
+
+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
+
+Do NOT modify or remove this file.
+
+------------------------------------------------------------------------
+Properties requiring vendor prefixes:
+None
+Property values requiring vendor prefixes:
+None
+------------------------------------------------------------------------
+List of files:
+/LayoutTests/imported/w3c/web-platform-tests/innerText/getter-tests.js
+/LayoutTests/imported/w3c/web-platform-tests/innerText/getter.html
+/LayoutTests/imported/w3c/web-platform-tests/innerText/setter-tests.js
+/LayoutTests/imported/w3c/web-platform-tests/innerText/setter.html
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to