OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <script src="../assert_selection.js"></script> |
| 5 <script src="spellcheck_test.js"></script> |
| 6 |
| 7 <script> |
| 8 spellcheck_test( |
| 9 '<div contenteditable>|zz. I have a issue.</div>', |
| 10 '', |
| 11 '<div contenteditable>#zz#. I have ~a~ issue.</div>', |
| 12 { |
| 13 title: 'Setup for the initial markers.', |
| 14 callback: sample => spellcheck_test( |
| 15 sample, |
| 16 document => document.querySelector('div').removeAttribute('contenteditab
le'), |
| 17 '<div>zz. I have a issue.</div>', |
| 18 'Removing "contenteditable" attribute removes spelling markers.') |
| 19 }); |
| 20 |
| 21 spellcheck_test( |
| 22 '<div contenteditable>|zz. I have a issue.</div>', |
| 23 '', |
| 24 '<div contenteditable>#zz#. I have ~a~ issue.</div>', |
| 25 { |
| 26 title: 'Setup for the initial markers.', |
| 27 callback: sample => spellcheck_test( |
| 28 sample, |
| 29 document => document.querySelector('div').setAttribute('contenteditable'
, 'false'), |
| 30 '<div contenteditable="false">zz. I have a issue.</div>', |
| 31 'Setting "contenteditable" attribute to "false" removes spelling markers
.') |
| 32 }); |
| 33 |
| 34 spellcheck_test( |
| 35 '<div contenteditable id="parent"><div>|zz. I have a issue.</div></div>', |
| 36 '', |
| 37 '<div contenteditable id="parent"><div>#zz#. I have ~a~ issue.</div></div>', |
| 38 { |
| 39 title: 'Setup for the initial markers.', |
| 40 callback: sample => spellcheck_test( |
| 41 sample, |
| 42 document => document.getElementById('parent').removeAttribute('contented
itable'), |
| 43 '<div id="parent"><div>zz. I have a issue.</div></div>', |
| 44 'Removing "contenteditable" attribute from parent removes spelling marke
rs.') |
| 45 }); |
| 46 |
| 47 spellcheck_test( |
| 48 '<div contenteditable id="parent"><div>|zz. I have a issue.</div></div>', |
| 49 '', |
| 50 '<div contenteditable id="parent"><div>#zz#. I have ~a~ issue.</div></div>', |
| 51 { |
| 52 title: 'Setup for the initial markers.', |
| 53 callback: sample => spellcheck_test( |
| 54 sample, |
| 55 document => document.getElementById('parent').setAttribute('contentedita
ble', 'false'), |
| 56 '<div contenteditable="false" id="parent"><div>zz. I have a issue.</div>
</div>', |
| 57 'Setting "contenteditable" attribute to "false" on parent removes spelli
ng markers.') |
| 58 }); |
| 59 |
| 60 spellcheck_test( |
| 61 '<div contenteditable><div id="child">|zz. I have a issue.</div></div>', |
| 62 '', |
| 63 '<div contenteditable><div id="child">#zz#. I have ~a~ issue.</div></div>', |
| 64 { |
| 65 title: 'Setup for the initial markers.', |
| 66 callback: sample => spellcheck_test( |
| 67 sample, |
| 68 document => document.getElementById('child').setAttribute('contenteditab
le', 'false'), |
| 69 '<div contenteditable><div contenteditable="false" id="child">zz. I have
a issue.</div></div>', |
| 70 'Setting "contenteditable" attribute to "false" on child removes spellin
g markers.') |
| 71 }); |
| 72 |
| 73 spellcheck_test( |
| 74 '<div contenteditable><div contenteditable id="child">|zz. I have a issue.</
div></div>', |
| 75 '', |
| 76 '<div contenteditable><div contenteditable id="child">#zz#. I have ~a~ issue
.</div></div>', |
| 77 { |
| 78 title: 'Setup for the initial markers.', |
| 79 callback: sample => spellcheck_test( |
| 80 sample, |
| 81 document => document.getElementById('child').removeAttribute('contentedi
table'), |
| 82 '<div contenteditable><div id="child">#zz#. I have ~a~ issue.</div></div
>', |
| 83 'Removing "contenteditable" attribute on child still keeps the spelling
markers.') |
| 84 }); |
| 85 |
| 86 </script> |
OLD | NEW |