<!DOCTYPE html>
<body>
    <div contenteditable="true" id="target">
        <input onblur="javascript:false;" onclick="javascript:false;" type="text"/>
    </div>
    <script>
        if (window.testRunner) {
            testRunner.dumpAsText();
            testRunner.waitUntilDone();
        }

        requestAnimationFrame(function() {
            var target = document.getElementById("target");
            var selection = window.getSelection();
            var range = document.createRange();
            range.selectNodeContents(target);
            selection.addRange(range);

            document.execCommand("Cut");
            document.execCommand("Paste");

            target.innerHTML = '';
            testRunner.notifyDone();
        });
    </script>
    <p>
        Test for WebKit bug #<a href="https://bugs.webkit.org/show_bug.cgi?id=150201">150201</a>.
        Test passes if it does not crash in an ASan build.
    </p>
</body>
