| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 |
| 3 <script src='../../resources/testharness.js'></script> |
| 4 <script src='../../resources/testharnessreport.js'></script> |
| 5 <script src='../../editing/assert_selection.js'></script> |
| 6 <script> |
| 7 test(function () { |
| 8 assert_not_equals(window.internals, undefined, |
| 9 'This test requires internals.'); |
| 10 assert_selection( |
| 11 '<div contenteditable>^appla| </div>', |
| 12 selection => { |
| 13 const document = selection.document; |
| 14 const start = selection.anchorOffset; |
| 15 const end = selection.focusOffset; |
| 16 assert_false(internals.hasSpellingMarker(document, start, end)); |
| 17 internals.setMarker(document, selection.getRangeAt(0), 'Spelling'); |
| 18 assert_true(internals.hasSpellingMarker(document, start, end)); |
| 19 internals.replaceMisspelled(document, 'apple'); |
| 20 }, |
| 21 '<div contenteditable>apple| </div>' |
| 22 ); |
| 23 }, 'test setMarker and replaceMisspelled in internals'); |
| 24 </script> |
| OLD | NEW |