<!DOCTYPE html>
<html>
<body>
<button onclick="runTest()">1. Copy</button>
<div><br></div>
<div id="source" oncopy="copy(event)" contenteditable>http://webkit.org/b/&#x1F914;?x=8 + 6</div>
<div id="destination" onpaste="paste(event)" contenteditable>2. Paste here</div>
<script>

const originalURL = document.getElementById('source').textContent;
function copy(event) {
    event.clipboardData.setData('url', originalURL);
    event.preventDefault();
}

function paste(event) {
    parent.postMessage({
        originalURL,
        url: event.clipboardData.getData('url'),
        types: event.clipboardData.types,
        items: Array.from(event.clipboardData.items).map((item) => ({kind: item.kind, type: item.type})),
    }, '*');
}

function runTest() {
    if (window.internals)
        internals.withUserGesture(() => { document.getElementById('source').focus(); });
    document.execCommand('selectAll');
    document.execCommand('copy');
    if (window.internals)
        internals.withUserGesture(() =>{ document.getElementById('destination').focus(); });
    if (window.testRunner)
        document.execCommand('paste');
}

if (window.testRunner)
    runTest();

</script>
</body>
</html>
