blob: 8d1bc5cd128b1af9884e7ee29f39c0e94534a21f [file] [log] [blame]
<script>
if (window.layoutTestController)
layoutTestController.dumpEditingCallbacks();
</script>
<p>This tests copy/delete/paste inside an editable iframe. You should see 'foo bar baz' below.</p>
<iframe src="../resources/contenteditable-iframe-src.html"></iframe>
<script>
function runTest() {
var frame = frames[0];
var sel = frame.getSelection();
var doc = frame.document;
sel.setPosition(doc.body, 0);
doc.execCommand("InsertText", false, "foo bar baz");
sel.modify("extend", "backward", "word");
doc.execCommand("Copy");
doc.execCommand("Delete");
doc.execCommand("Paste");
if (window.layoutTestController)
window.layoutTestController.notifyDone();
}
if (window.layoutTestController)
window.layoutTestController.waitUntilDone();
window.setTimeout(runTest, 100);
</script>