chromium/third_party/blink/web_tests/editing/pasteboard/paste-event-only-once.html

<body>
<p>Pasting in the text area should only fire one paste event.</p>
<textarea id="test">Content</textarea>
<p id="results">FAILED</p>
</body>
<script src="../editing.js"></script>
<script>
function editingTest()
{
    var firedCount = 0;
    document.getElementById("test").addEventListener("paste", function(){
        firedCount++
    }, false);

    document.getElementById("test").focus();
    execSelectAllCommand();
    execCopyCommand();
    execPasteCommand();

    if (firedCount == 1)
        document.getElementById("results").innerText = "PASSED";
    else
        document.getElementById("results").innerText = "FAILED firedCount:" + firedCount;
}

runDumpAsTextEditingTest(false);
</script>