Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="../../resources/js-test.js"></script> | |
| 5 </head> | |
| 6 <body> | |
| 7 <div id="test-div" contentEditable="true"><select></div> | |
|
yosin_UTC9
2014/06/12 06:38:10
nit: It it better to have "</select>". Does omitti
Yuta Kitamura
2014/06/12 07:34:49
Oops, I thought the close tag was omissible just l
| |
| 8 <script> | |
| 9 description('Undo command should not make a selection anchored in another docume nt.'); | |
| 10 | |
| 11 window.jsTestIsAsync = true; | |
| 12 | |
| 13 var div = document.getElementById('test-div'); | |
| 14 | |
|
yosin_UTC9
2014/06/12 06:38:10
nit: We don't need to have this extra blank line.
Yuta Kitamura
2014/06/12 07:34:49
Done.
| |
| 15 var selection = window.getSelection(); | |
| 16 | |
| 17 div.focus(); | |
| 18 document.execCommand('SelectAll'); | |
| 19 document.execCommand('Indent'); | |
| 20 document.execCommand('Outdent'); | |
| 21 | |
| 22 var anotherDocument = document.implementation.createHTMLDocument(''); | |
| 23 anotherDocument.body.appendChild(selection.getRangeAt(0).extractContents()); | |
| 24 | |
| 25 div.contentEditable = false; | |
| 26 | |
| 27 document.execCommand('Undo'); | |
| 28 document.execCommand('FindString', false, 'x'); | |
| 29 | |
| 30 window.setTimeout(function () { | |
| 31 document.body.removeChild(div); | |
| 32 testPassed('Did not crash.'); | |
| 33 finishJSTest(); | |
| 34 }, 0); | |
| 35 </script> | |
| 36 </body> | |
| 37 </html> | |
| OLD | NEW |