| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../js/resources/js-test-pre.js"></script> |
| 3 <div id="test" contenteditable><b is="x-a" style="font-style: italic;">Hello, wo
rld!</b></div> |
| 4 <script> |
| 5 // This test is based on |
| 6 // editing/undo/replace-by-span-then-remove.html. Fuzzing tickled an |
| 7 // assert; this is the reduced test case. Bolding will swap the B for |
| 8 // a SPAN; undoing and redoing the command will reapply the "is" |
| 9 // attribute to the original custom element. |
| 10 |
| 11 description('Tests that execCommand undo doesn\'t hork custom elements'); |
| 12 |
| 13 var test = document.getElementById('test'); |
| 14 window.getSelection().selectAllChildren(test); |
| 15 document.execCommand('bold', false, null); |
| 16 document.execCommand('undo', false, null); |
| 17 document.execCommand('undo', false, null); |
| 18 |
| 19 testPassed('did not crash'); |
| 20 var successfullyParsed = true; |
| 21 </script> |
| 22 <script src="../../js/resources/js-test-post.js"></script> |
| OLD | NEW |