<!DOCTYPE html>
<html>
<body>
<script src="../../resources/js-test-pre.js"></script>
<div id="container">
<div id="source" contenteditable="true" oncopy="check(event)">hello</div>
<button onclick="runTest()">Start the test</button>
</div>
<script>
description("Tests that DataTransfer's types is initially empty on copy. To manually test, press the button below.");
jsTestIsAsync = true;

function check(event) {
    shouldBeEqualToString('JSON.stringify(event.clipboardData.types)', '[]');
}

function runTest()
{
    const source = document.getElementById('source');
    source.focus();
    document.execCommand('SelectAll', false, null);
    document.execCommand('Copy', false, null);
    source.parentNode.style.display = 'none';
    finishJSTest();
}

if (window.testRunner)
    runTest();

successfullyParsed = true;

</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>
