chromium/third_party/blink/web_tests/paint/selection/text-selection-drag-in-frame-scrolled.html

<!DOCTYPE html>
<script src="../../resources/ahem.js"></script>
<script src="../../resources/run-after-layout-and-paint.js"></script>
<script>
onload = function() {
  if (!window.testRunner)
    return;

  testRunner.dumpDragImage();
  iframe.contentWindow.scrollBy(0, 123);
  runAfterLayoutAndPaint(function() {
    iframe.contentWindow.getSelection().selectAllChildren(iframe.contentDocument.body);
    var x = iframe.offsetLeft + iframe.offsetWidth / 2;
    var y = iframe.offsetTop + iframe.offsetHeight / 2;
    eventSender.dragMode = true;
    eventSender.mouseMoveTo(x, y);
    eventSender.mouseDown();
    eventSender.leapForward(200);
    eventSender.mouseMoveTo(x + 50, y + 50);
    eventSender.mouseUp();
  }, true);
}
</script>
<iframe id="iframe" style="position: absolute; top: 200px; left: 300px; width: 300px; height: 200px; border: none"
    srcdoc="
      <!DOCTYPE html>
      <style>
        body {
          color: green;
          font: 25px/1 Ahem;
        }
      </style>
      To run this test manually, select some text and drag it around. The dragged text should be clipped in the same way as the original text.">
</iframe>