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