Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / editing / pasteboard / paste-noscript-xhtml.xhtml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <body onload="runTest()">
5 <div id="description">
6 This test copies the content of an iframe and pastes it
7 in an editable area in an xhtml document and verifies that no script, handlers or javascript urls are copied.
8 </div>
9 <iframe id="iframe1" src="resources/paste-noscript-content.html"></iframe>
10 <div id="pastehere" contenteditable="true"></div>
11 <script src="../../resources/dump-as-markup.js"></script>
12 <script>
13
14 Markup.waitUntilDone();
15
16 function runTest() {
17     Markup.description(document.getElementById('description').textContent);
18
19     var doc = frames[0].document;
20     getSelection().collapse(doc.body, 0);
21     doc.execCommand("SelectAll");
22     doc.execCommand("Copy");
23
24     Markup.dump(doc.body, 'Copied content');
25
26     getSelection().collapse(document.getElementById("pastehere"), 0);
27     document.execCommand("Paste");
28     Markup.dump('pastehere', 'Pasted content');
29
30     Markup.notifyDone();
31 }
32
33 </script>
34 </body>
35 </html>