Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / editing / pasteboard / pasting-tabs.html
1 <script>
2 if (window.testRunner)
3      testRunner.dumpEditingCallbacks();
4 </script>
5 <p>This tests copying plain text with tabs and pasting it into an editable region using paste and match tyle.  The tabs should be preserved.</p>
6 <textarea id="textarea">Tab->   <-Tab</textarea>
7
8 <div id="div" contenteditable="true"></div>
9
10 <script>
11 var textarea = document.getElementById("textarea");
12 textarea.setSelectionRange(0, 0);
13 document.execCommand("SelectAll");
14 document.execCommand("Copy");
15 var div = document.getElementById("div");
16 window.getSelection().collapse(div, 0);
17 document.execCommand("PasteAndMatchStyle");
18 </script>