summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/editing/execCommand/paste-2.html
blob: 5387cf9a50a06a4e00a3ec5d8499ea662af0df10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<script>
if (window.testRunner)
     testRunner.dumpEditingCallbacks();

function runTest() {
    var frame = frames[0];
    var sel = frame.getSelection();
    var doc = frame.document;
    
    sel.collapse(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.testRunner)
        window.testRunner.notifyDone();
}

if (window.testRunner)
    window.testRunner.waitUntilDone();
</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" onload="runTest();"></iframe>