| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <script src="../../resources/testharness.js"></script> |
| 3 <head> | 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <script src="../../resources/js-test.js"></script> | 4 <script src="../assert_selection.js"></script> |
| 5 <script src="resources/util.js"></script> | 5 <script src="spellcheck_test.js"></script> |
| 6 </head> | |
| 7 <body> | |
| 8 <div id="container"> | |
| 9 <input id="destination" type="text" name="type" value=""> | |
| 10 </div> | |
| 11 | 6 |
| 12 <script> | 7 <script> |
| 13 | 8 spellcheck_test( |
| 14 description("Spell check does not crash after Ctrl-X/Ctrl-V/type text in ASAN. "
+ | 9 '<input type="text">', |
| 15 "To test manually, type 'A', Ctrl-A, Ctrl-X, Ctrl-V, and start typin
g again. " + | 10 document => { |
| 16 "The test succeeds when there's no crash in the last step."); | 11 document.querySelector('input').focus(); |
| 17 | 12 document.execCommand('insertText', false, 'A'); |
| 18 initSpellTest("destination", "A", function(textNode) { | 13 }, |
| 19 var behaviors = ["win", "mac"]; | 14 '<input type="text" value="A">', |
| 20 for (var i = 0; i < behaviors.length; i++) { | 15 { |
| 21 internals.settings.setEditingBehavior(behaviors[i]); | 16 title: 'Initial setup.', |
| 22 document.execCommand("SelectAll"); | 17 callback: sample => spellcheck_test( |
| 23 document.execCommand("Cut"); | 18 sample, |
| 24 document.execCommand("Paste"); | 19 document => { |
| 25 document.execCommand("InsertText", false, "A"); | 20 document.execCommand('selectAll'); |
| 26 } | 21 document.execCommand('cut'); |
| 27 log("PASS Did not crash"); | 22 document.execCommand('paste'); |
| 28 }); | 23 document.execCommand('insertText', false, 'A'); |
| 29 | 24 }, |
| 25 '<input type="text" value="AA">', |
| 26 'Spell check does not crash after Ctrl-X/Ctrl-V/type text in ASAN.') |
| 27 }); |
| 30 </script> | 28 </script> |
| 31 </body> | |
| 32 </html> | |
| OLD | NEW |