<!DOCTYPE html>
<html>
<head>
    <script src="../../resources/js-test-pre.js"></script>
</head>
<body>
    <textarea onfocus=handleFocus() id="plain" onbeforeinput=handlePlainInput(event,true) oninput=handlePlainInput(event,false)>testing</textarea>
    <div id="rich" contenteditable onbeforeinput=handleRichInput(event,true) oninput=handleRichInput(event,false)></div>
    <script type="text/javascript">
        description(`To manually test this, copy the word 'testing' and paste into both the textarea and contenteditable. Verify that two PASS messages are printed out per paste (one for the beforeinput, the other for input).`);
        (function() {
            if (!window.internals || !window.eventSender || !window.testRunner)
                return;
            document.querySelector("#plain").focus();
        })();

        function handleFocus()
        {
            document.querySelector("#plain").select();
            testRunner.execCommand("Cut");

            debug("pasting 'testing' in the plain textarea. data should be nonnull");
            testRunner.execCommand("Paste");

            document.querySelector("#rich").focus();
            debug("pasting 'testing' in the rich contenteditable. data should be null");
            testRunner.execCommand("Paste");
        }

        function handleRichInput(event, isbefore)
        {
            if (event.inputType === "insertFromPaste")
                shouldBeNull("event.data");
        }

        function handlePlainInput(event, isbefore)
        {
            if (event.inputType === "insertFromPaste")
                shouldBe("event.data", "'testing'");
        }
    </script>
    <script src="../../resources/js-test-post.js"></script>
</body>

</html>
