Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / editing / pasteboard / paste-noscript-svg.html
1 <script>
2 if (window.testRunner)
3      window.testRunner.dumpAsText();
4
5 if (window.testRunner)
6     window.testRunner.waitUntilDone();
7
8 function foo() {
9     var frame = frames[0];
10     var sel = frame.getSelection();
11     var doc = frame.document;
12     doc.execCommand("SelectAll");
13     doc.execCommand("Copy");
14
15     var p1 = document.getElementById("pastehere");
16     var s = window.getSelection();
17     s.collapse(p1, 0);
18     document.execCommand("Paste");
19     log(document.getElementById("pastehere").innerHTML);
20
21     if (window.testRunner)
22         window.testRunner.notifyDone();
23 }
24
25 function log(str) {
26     var li = document.createElement("li");
27     li.appendChild(document.createTextNode(str));
28     var console = document.getElementById("console");
29     console.appendChild(li);
30 }
31 </script>
32 <div id="description">
33 This test copies the content of an iframe and pastes it
34 in an editable area and verifies that no script, handlers or javascript urls are copied.
35 </div>
36 <div id="pastehere" contenteditable="true"></div>
37 <ul id="console"></ul>
38 <iframe id="iframe1" src="../resources/svgcontent.xhtml" onload="foo()"></iframe>