Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / pasteboard / 4944770-1.html
blob63f1f52c0e584b3f2ae6d8153a73db4663e65c96
1 <p>This tests smart paste of a fragment that ends in a select element. There should be no spaces added because the paste is performed in an empty paragraph.</p>
2 <div contenteditable="true" id="copy">foo<select><option>1</option><option>2</option><option>3</option></select></div>
3 <div contenteditable="true" id="paste"></div>
5 <script>
6 var copy = document.getElementById("copy");
7 var paste = document.getElementById("paste");
8 var sel = window.getSelection();
10 sel.collapse(copy, 0);
11 sel.modify("extend", "forward", "word");
12 sel.modify("extend", "forward", "word");
13 document.execCommand("Copy");
15 sel.collapse(paste, 0);
16 document.execCommand("Paste");
17 </script>