| 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> |
| 6 test(() => { |
| 7 assert_exists(window, 'testRunner', 'This test requires testRunner'); |
| 8 |
| 9 assert_selection( |
| 10 [ |
| 11 '<div contenteditable><a href="http://www.example.com/">^text|</a></div>', |
| 12 '<a href="http://www.example2.com/" id="other">link</a>' |
| 13 ].join(''), |
| 14 selection => { |
| 15 const other = selection.document.getElementById('other'); |
| 16 other.focus(); |
| 17 testRunner.execCommand('unlink'); |
| 18 assert_equals(selection.document.activeElement, other); |
| 19 }, |
| 20 [ |
| 21 '<div contenteditable><a href="http://www.example.com/">^text|</a></div>', |
| 22 '<a href="http://www.example2.com/" id="other">link</a>' |
| 23 ].join('')); |
| 24 }, 'Unlink with unfocused selection in contenteditable div'); |
| 25 </script> |
| OLD | NEW |