blob: 7c4b11ada555be71843de81a81f57a2b1d99d594 [file] [log] [blame]
<html>
<head>
<script>
function handleCopy(event)
{
event.clipboardData.setData('text/html', '');
event.clipboardData.setData('text/plain', '\nPASS');
event.preventDefault();
}
function runTest()
{
if (!window.testRunner)
return;
testRunner.dumpAsText();
document.body.addEventListener('copy', handleCopy);
testRunner.execCommand('copy');
var selection = window.getSelection();
var range = document.createRange();
range.selectNode(document.getElementById('description'));
selection.addRange(range);
selection.collapseToEnd();
testRunner.execCommand('paste');
}
</script>
<body onload="runTest()" contenteditable="true">
<p id="description">This test requires DRT. It verifies that pasting in a richly editable area falls back to text if the HTML content is an empty string.
</body>
</html>