| <!doctype html> |
| <script src="../../resources/testharness.js"></script> |
| <script src="../../resources/testharnessreport.js"></script> |
| <script src="../assert_selection.js"></script> |
| <script> |
| test(() => assert_selection( |
| '<div contenteditable><span>^foo| bar baz</span></div>', |
| 'delete', |
| '<div contenteditable><span>|\u{00A0}bar baz</span></div>'), |
| 'Delete characters with trailing whitespaces'); |
| test(() => assert_selection( |
| '<div contenteditable><span>foo<br>bar| baz</span></div>', |
| selection => { |
| selection.document.execCommand('delete'); |
| selection.document.execCommand('delete'); |
| selection.document.execCommand('delete'); |
| }, |
| '<div contenteditable><span>foo<br>|\u{00A0}baz</span></div>'), |
| 'Delete characters with trailing whitespaces after BR'); |
| </script> |