Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 | |
|
yosin_UTC9
2016/01/27 06:02:38
nit: We don't need to have an extra blank line.
Xiaocheng
2016/01/27 07:20:37
Done.
| |
| 3 <script src="../../resources/testharness.js"></script> | |
| 4 <script src="../../resources/testharnessreport.js"></script> | |
| 5 | |
|
yosin_UTC9
2016/01/27 06:02:38
nit: We don't need to have an extra blank line.
Xiaocheng
2016/01/27 07:20:37
Done.
| |
| 6 <div id="src"> | |
| 7 <div>Some text.</div> | |
| 8 <div>Some other text.</div> | |
| 9 </div> | |
| 10 | |
|
yosin_UTC9
2016/01/27 06:02:38
nit: We don't need to have an extra blank line.
Xiaocheng
2016/01/27 07:20:37
Done.
| |
| 11 <div contenteditable="true" id="dest"> | |
| 12 </div> | |
| 13 | |
|
yosin_UTC9
2016/01/27 06:02:38
nit: We don't need to have an extra blank line.
Xiaocheng
2016/01/27 07:20:37
Done.
| |
| 14 <script> | |
| 15 // A repro of crbug.com/580950, which crashes in debug build. | |
| 16 document.body.onload = function() { | |
| 17 var src = document.getElementById('src'); | |
| 18 var dest = document.getElementById('dest'); | |
| 19 var sel = window.getSelection(); | |
| 20 dest.addEventListener('webkitEditableContentChanged', function() { dest.inne rHTML='' }); | |
|
yosin_UTC9
2016/01/27 06:02:38
nit: Should be multiple lines.
nit: Need spaces ar
Xiaocheng
2016/01/27 07:20:37
Done.
| |
| 21 | |
| 22 test(function() { | |
| 23 sel.setBaseAndExtent(src, 0, src, src.childNodes.length); | |
| 24 document.execCommand('copy'); | |
| 25 dest.focus(); | |
| 26 document.execCommand('paste'); | |
| 27 | |
| 28 assert_equals(dest.innerHTML, ''); | |
| 29 }, 'A pasting that fires a webkitEditableContentChanged event should not cra sh.'); | |
| 30 | |
| 31 src.style.display = "none"; | |
|
yosin_UTC9
2016/01/27 06:02:38
Add <div id="log"></div> instead of hide output.
Xiaocheng
2016/01/27 07:20:37
Ah I didn't know this. Done.
| |
| 32 dest.style.display = "none"; | |
| 33 } | |
| 34 </script> | |
| OLD | NEW |