<!DOCTYPE html> <!-- webkit-test-runner [ AsyncOverflowScrollingEnabled=true ] -->
<html>
<head>
  <style>
    html {
      -webkit-overflow-scrolling: touch;
    }

    textarea {
      width: 200px;
      height: 120px;
      margin: 10px;
      border: 1px solid black;
      display: inline-block;
      font-size: 24pt;
    }
  </style>
  <script>
    if (window.testRunner)
      testRunner.dumpAsText();

    function testScrollability(element)
    {
      // This will cause scrolled elements will have a 'bounds origin' of y=50 in their layer.
      element.scrollTop = 50;
    }
    
    function doTest()
    {
      var divs = document.querySelectorAll('body > textarea');
      for (var i = 0; i < divs.length; ++i)
        testScrollability(divs[i]);
      
      if (window.testRunner)
        document.getElementById('results').innerText = window.internals.layerTreeAsText(document);
    }
    window.addEventListener('load', doTest, false);
  </script>
</head>
<body>

  <textarea>
    Lorem ipsum dolor sit amet, consectetur adipisicing elit.
  </textarea>

  <textarea disabled>
    Lorem ipsum dolor sit amet, consectetur adipisicing elit.
  </textarea>
  
  <pre id="results">This test requires DRT.</pre>
</body>
</html>
