Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!doctype HTML> | |
| 2 <script src="../../resources/testharness.js"></script> | |
| 3 <script src="../../resources/testharnessreport.js"></script> | |
| 4 <script src="../assert_selection.js"></script> | |
| 5 <script> | |
| 6 test(() => assert_selection( | |
| 7 '<div id="copy" style="width: 10em;">^Copy this area <a href="http://foo/">AVe ryLongWordThatWillWrap|</a></div><div contenteditable id="editor"></div>', | |
| 8 selection => { | |
| 9 var copy = selection.document.getElementById('copy'); | |
|
yosin_UTC9
2016/08/04 01:18:45
nit: Please remove this statement since variable |
joone
2016/08/04 06:18:22
Done.
| |
| 10 var editor = selection.document.getElementById('editor'); | |
| 11 | |
| 12 selection.document.execCommand('copy'); | |
| 13 selection.collapse(editor); | |
| 14 selection.document.execCommand('paste'); | |
| 15 }, | |
| 16 '<div id="copy" style="width: 10em;">Copy this area <a href="http://foo/">AVer yLongWordThatWillWrap</a></div><div contenteditable id="editor">Copy this area\u 00A0<a href="http://foo/">AVeryLongWordThatWillWrap|</a></div>'), | |
| 17 'Restore the collapsed space'); | |
| 18 </script> | |
| OLD | NEW |