blob: 0cd6b604fdcd8b9ed98683a57446b9d83d84d915 (
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
<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;
doc.execCommand("SelectAll");
doc.execCommand("Copy");
var p1 = document.getElementById("pastehere");
var s = window.getSelection();
s.collapse(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>
|