| OLD | NEW |
| (Empty) | |
| 1 <!doctype html> |
| 2 <div id="div" contenteditable></div> |
| 3 <script src="../../resources/testharness.js"></script> |
| 4 <script src="../../resources/testharnessreport.js"></script> |
| 5 <script> |
| 6 // Regression test for crbug.com/635452 |
| 7 |
| 8 if (window.internals) |
| 9 internals.settings.setUnifiedTextCheckerEnabled(true); |
| 10 |
| 11 async_test(function(t) { |
| 12 var div = document.getElementById('div'); |
| 13 div.focus(); |
| 14 document.execCommand("InsertText", false, 'z'); |
| 15 document.execCommand("InsertText", false, 'z'); |
| 16 document.execCommand("InsertText", false, ' '); |
| 17 document.execCommand("InsertText", false, 'a'); |
| 18 document.execCommand("InsertText", false, 'p'); |
| 19 document.execCommand("InsertText", false, 'p'); |
| 20 document.execCommand("InsertText", false, 'l'); |
| 21 document.execCommand("InsertText", false, 'e'); |
| 22 step_timeout(() => { |
| 23 assert_true(window.internals !== undefined, 'window.internals is require
d to inspect markers'); |
| 24 assert_true(internals.hasSpellingMarker(document, 0, 2), '"zz" should be
marked'); |
| 25 t.done(); |
| 26 }, 50); |
| 27 }, 'Misspelled words should be marked after consecutive InsertText commands.'); |
| 28 </script> |
| OLD | NEW |