chromium/third_party/blink/web_tests/fast/dom/inner-text-001.html

<html>
<head>
    <style type="text/css">
      ul.colored { 
        background: yellow; 
        margin: 12px 12px 12px 12px;
        padding: 3px 3px 3px 3px;
      }
      li.colored { 
        color: white; 
        background: blue;
        margin: 12px 12px 12px 12px;
        padding: 12px 0px 12px 12px;
        list-style: none;
      }
      h4.colored {
        color: white; 
        background: blue;
        margin: 12px 12px 12px 12px;
        padding: 12px 0px 12px 12px;
      }
    </style>
</head>

<body style="font-size: 12px;">
<div contenteditable id="test" style="border-style:solid; border-color:red">
<h2>Test innerText</h1>
<h3>Check lists, tables, styled text, and images.</h3>
Block flow elements get line breaks before and after.  Table cells are tab separated.
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
<table border=1><tr><td>1</td><td>2</td><td><span">3</span></td></tr><tr><td>4</td><td>5</td><td><span">6</span></td></tr></table>
<br>
Right <h4 style="display:inline">here</h4> is an inline block.
<br>
And an <table border=1 style="display:inline-table"><td>inline</td><td>table</td><td>with</td><td>one</td><td>row</td></table> is here, too.
<br>
And an <table border=1 style="display:inline-table"><tr><td>inline</td><td>table</td></tr><tr><td>with</td><td>rows</td></tr></table> not far behind.
<h3>Check collapsed margins</h3>
Collapsed margins are supposed to result in an extra line break.
<h4 class="colored">First header</h4>
<h4 class="colored">Second header</h4>
<ul class="colored">
  <li class="colored">First list element</li>
  <li class="colored">Second list element</li>
</ul>
This <b>line</b> contains <img src="../replaced/resources/compass.jpg"> an image.
</div>
<p><b><u>The innerText of the above:</u></b></p>
<pre id="innertext"></pre>
<script>
    if (window.testRunner)
        testRunner.dumpAsText();
    
    document.getElementById("innertext").innerText = document.getElementById("test").innerText; 
</script>
</body>

</html>