1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32

content / test / data / accessibility / html / list-text-removal.html [blame]

<!--
@BLINK-ALLOW:hierarchicalLevel*
@WAIT-FOR:done
-->
<html>
  <style type="text/css">
    .inlineList li {
      display: inline;
    }
  </style>
  <body>
    <ul class="inlineList">
      <li>item</li>
    </ul>$
  </body>
<script>
function convertDollarToWhitespace(node) {
  let child = node.firstChild;
  while (child) {
    if (child.nodeType == Node.ELEMENT_NODE)
      convertDollarToWhitespace(child);
    else if (child.nodeType == Node.TEXT_NODE && child.data.indexOf('$') >= 0)
      child.data = '  \n ';
    child = child.nextSibling;
  }
}
setTimeout(() => {
  convertDollarToWhitespace(document.body);
  document.title = 'done';
}, 500);
</script>
</html>