| 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 '<textarea>|zz. I have a issue.</textarea>', |
| 10 '', |
| 11 '<textarea>#zz#. I have ~a~ issue.</textarea>', |
| 12 { |
| 13 title: '1) Setup for the initial markers.', |
| 14 callback: sample => spellcheck_test( |
| 15 sample, |
| 16 document => document.querySelector('textarea').setAttribute('disabled',
'true'), |
| 17 '<textarea disabled="true">zz. I have a issue.</textarea>', |
| 18 'Set "disabled" attribute on <textarea> removes spelling markers.') |
| 19 }); |
| 20 |
| 21 spellcheck_test( |
| 22 '<input value="zz. I have a issue.">', |
| 23 document => document.querySelector('input').focus(), |
| 24 '<input value="#zz#. I have ~a~ issue.">', |
| 25 { |
| 26 title: '2) Setup for the initial markers.', |
| 27 callback: sample => spellcheck_test( |
| 28 sample, |
| 29 document => document.querySelector('input').setAttribute('disabled', 'tr
ue'), |
| 30 '<input disabled="true" value="zz. I have a issue.">', |
| 31 'Set "disabled" attribute on <input> removes spelling markers.') |
| 32 }); |
| 33 |
| 34 spellcheck_test( |
| 35 '<textarea>|zz. I have a issue.</textarea>', |
| 36 '', |
| 37 '<textarea>#zz#. I have ~a~ issue.</textarea>', |
| 38 { |
| 39 title: '3) Setup for the initial markers.', |
| 40 callback: sample => spellcheck_test( |
| 41 sample, |
| 42 document => document.querySelector('textarea').setAttribute('readonly',
'true'), |
| 43 '<textarea readonly="true">zz. I have a issue.</textarea>', |
| 44 'Set "readonly" attribute on <textarea> removes spelling markers.') |
| 45 }); |
| 46 |
| 47 spellcheck_test( |
| 48 '<input value="zz. I have a issue.">', |
| 49 document => document.querySelector('input').focus(), |
| 50 '<input value="#zz#. I have ~a~ issue.">', |
| 51 { |
| 52 title: '4) Setup for the initial markers.', |
| 53 callback: sample => spellcheck_test( |
| 54 sample, |
| 55 document => document.querySelector('input').setAttribute('readonly', 'tr
ue'), |
| 56 '<input readonly="true" value="zz. I have a issue.">', |
| 57 'Set "readonly" attribute on <input> removes spelling markers.') |
| 58 }); |
| 59 |
| 60 </script> |
| OLD | NEW |