| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <script src="../../resources/testharness.js"></script> | 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> | 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <script src="../assert_selection.js"></script> | 4 <script src="../assert_selection.js"></script> |
| 5 <script> | 5 <script> |
| 6 test(() => assert_selection( | 6 test(() => assert_selection( |
| 7 '<div contenteditable>here is <i>some|</i> text</div>', | 7 '<div contenteditable>here is <i>some|</i> text</div>', |
| 8 selection => { | 8 selection => { |
| 9 for (var i = 0; i < 5; ++i) | 9 for (var i = 0; i < 5; ++i) |
| 10 selection.document.execCommand('delete'); | 10 selection.document.execCommand('delete'); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 selection.document.execCommand('italic'); | 47 selection.document.execCommand('italic'); |
| 48 selection.document.execCommand('insertText', false, 'ghi'); | 48 selection.document.execCommand('insertText', false, 'ghi'); |
| 49 | 49 |
| 50 selection.document.execCommand('bold'); // disable bold | 50 selection.document.execCommand('bold'); // disable bold |
| 51 selection.document.execCommand('insertText', false, 'jkl'); | 51 selection.document.execCommand('insertText', false, 'jkl'); |
| 52 | 52 |
| 53 selection.document.execCommand('italic'); // disable italic | 53 selection.document.execCommand('italic'); // disable italic |
| 54 selection.document.execCommand('insertText', false, 'mno'); | 54 selection.document.execCommand('insertText', false, 'mno'); |
| 55 }, | 55 }, |
| 56 '<div contenteditable>abc<b>def</b><i><b>ghi</b>jkl</i>mno|</div>'), | 56 '<div contenteditable>abc<b>def</b><i style><b>ghi</b>jkl</i>mno|</div>'
), |
| 57 'Nested styles and disabling styles'); | 57 'Nested styles and disabling styles'); |
| 58 | 58 |
| 59 test(() => assert_selection( | 59 test(() => assert_selection( |
| 60 '<div contenteditable>here is <i>^some|</i> text</div>', | 60 '<div contenteditable>here is <i>^some|</i> text</div>', |
| 61 'insertText abcd', | 61 'insertText abcd', |
| 62 '<div contenteditable>here is <i>abcd|</i> text</div>'), | 62 '<div contenteditable>here is <i>abcd|</i> text</div>'), |
| 63 'Replace selection keeps style'); | 63 'Replace selection keeps style'); |
| 64 </script> | 64 </script> |
| OLD | NEW |