<!DOCTYPE html> <!-- webkit-test-runner [ AsyncOverflowScrollingEnabled=true ] -->
<html>
  <head>
    <title>Find text in overflow node</title>
    <meta name="viewport" content="width=device-width">
    <script type="text/javascript">
      if (window.testRunner)
          testRunner.waitUntilDone();
      async function run() {
        if (!window.testRunner || !testRunner.runUIScript)
          return;

        var findOptions = 1 << 6; // show find indicator
        var maxCount = 1;
        await new Promise(resolve => {
            testRunner.runUIScript(`
                uiController.findString("match", ${findOptions}, ${maxCount});
                uiController.findString("match", ${findOptions}, ${maxCount});
                uiController.uiScriptComplete("");
            `, resolve);
        });

        testRunner.notifyDone();
      }
    </script>
    <style>
      #scrollable {
        border: 1px solid black;
        background: gray;
        width: 200px;
        height: 200px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
      }
    </style>
  </head>
  <body onload="run();">
    <p>Use iOS Find UI to search for the text "match" in the following overflow node. The result should be highlighted.</p>
    <div id="scrollable">
      <div style="height: 300px; background: linear-gradient(135deg, blue, cyan);"></div>
      <div>match</div>
      <div style="height: 300px; background: linear-gradient(135deg, blue, cyan);"></div>
    </div>
  </body>
</html>
