blob: 1600ebd749d90e894432f583a1db843ec74d45a9 [file] [log] [blame]
<html>
<script src="../editing.js"></script>
<script>
function mycopy(event)
{
event.clipboardData.setData('text/plain', "SUCCESS");
event.preventDefault();
}
function mypaste(event)
{
var clip = event.clipboardData.getData('text/plain');
document.getElementById('result').innerHTML = clip;
event.preventDefault();
}
function test()
{
execCopyCommand();
var e = document.getElementById('result');
setSelectionCommand(e, 0, e, 0);
execPasteCommand();
if (window.layoutTestController)
layoutTestController.dumpAsText();
}
</script>
<body onload='test()' onbeforecopy='event.preventDefault()' oncopy='mycopy(event)' onbeforepaste='event.preventDefault()' onpaste='mypaste(event)'>
<div id='result' contenteditable='true'>FAILURE</div>
</body>
</html>