blob: 700fc1a7864064542d24bcb17c9e9872897e284f [file] [log] [blame]
<script>
if (window.testRunner)
window.testRunner.dumpAsText();
if (window.testRunner)
window.testRunner.waitUntilDone();
function foo() {
var frame = frames[0];
var sel = frame.getSelection();
var doc = frame.document;
sel.setPosition(doc.body, 0);
doc.execCommand("SelectAll");
doc.execCommand("Copy");
var p1 = document.getElementById("pastehere");
var s = window.getSelection();
s.setPosition(p1, 0);
document.execCommand("Paste");
log(document.getElementById("pastehere").innerHTML);
if (window.testRunner)
window.testRunner.notifyDone();
}
function log(str) {
var li = document.createElement("li");
li.appendChild(document.createTextNode(str));
var console = document.getElementById("console");
console.appendChild(li);
}
</script>
<div id="description">
This test copies the content of an iframe and pastes it
in an editable area and verifies that no script, handlers or javascript urls are copied.
</div>
<div id="pastehere" contenteditable="true"></div>
<ul id="console"></ul>
<iframe id="iframe1" src="../resources/svgcontent.xhtml" onload="foo()"></iframe>