blob: 9e6b29c267806f17376afb440369d7823158d6a1 [file] [log] [blame]
<!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>