Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / editing / pasteboard / paste-noplugin.html
1 <!DOCTYPE html>
2 <html>
3 <script>
4 if (window.testRunner) {
5    testRunner.dumpAsText();
6    internals.settings.setUnsafePluginPastingEnabled(false);
7 }
8 </script>
9 <script src="../../resources/dump-as-markup.js"></script>
10 <div id="source">
11 <p>Some text to paste.</p>
12 <embed src="http://localhost:8000/evil.swf"></embed>
13 <object data="http://localhost:8000/evil.swf"><param name="src" value="http://localhost:8000/evil.swf"><embed src="http://localhost:8000/evil.swf"></embed></object>
14 </div>
15 <div id="destination" contenteditable="true"></div>
16 <ul id="console"></ul>
17 <script>
18 var source = document.getElementById("source");
19 var destination = document.getElementById("destination");
20 var selection = window.getSelection();
21 selection.setBaseAndExtent(source, 0, source, 5);
22 document.execCommand("Copy");
23 selection.collapse(destination, 0);
24 document.execCommand("Paste");
25 Markup.description("This test copies embed and object elements, pastes them into an editable area, and verifies that unsafe tags are not pasted when the setting prohibits this.");
26 Markup.dump("source", "Original contents");
27 Markup.dump("destination", "Pasted contents");
28 </script>
29 </html>