| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <body contenteditable="true"><div contenteditable="true"><span contenteditable="
true"><span contenteditable="true"><span contenteditable="true"><span contentedi
table="true"><span contenteditable="false"><span contenteditable="true"><span co
ntenteditable="true"><span contenteditable="true"><span contenteditable="true"><
span contenteditable="true"><span contenteditable="true"><span contenteditable="
true"><span contenteditable="true"><span>foo</span><ol>bar</ol></span><ol>bar</o
l></span><ol>bar</ol></span><ol>bar</ol></span><ol>bar</ol></span><ol>bar</ol></
span><ol>bar</ol></span><ol>bar</ol><head> | 2 <script src="../../resources/testharness.js"></script> |
| 3 <style> | 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 </style> | 4 <script src="../assert_selection.js"></script> |
| 5 | |
| 6 </head></span><ol>bar</ol></span><ol>bar</ol></span><ol>bar</ol></span><ol>bar</
ol></span><ol>bar</ol></span><ol>bar</ol></div><div></div> | |
| 7 <script> | 5 <script> |
| 8 if (window.testRunner) { | 6 test(() => assert_selection( |
| 9 testRunner.dumpAsText(); | 7 [ |
| 10 testRunner.waitUntilDone(); | 8 '<div contenteditable="true">', |
| 11 } | 9 '<span contenteditable="false">', |
| 12 | 10 '<span contenteditable="true">', |
| 13 document.execCommand("SelectAll"); | 11 '<span>foo</span>', |
| 14 document.execCommand("Indent"); | 12 '<ol>bar</ol>', |
| 15 | 13 '</span>', |
| 16 window.setTimeout(function() { | 14 '<ol>bar</ol>', |
| 17 document.write("PASS"); | 15 '</span>', |
| 18 if (window.testRunner) | 16 '<ol>bar</ol>', |
| 19 testRunner.notifyDone(); | 17 '</div>', |
| 20 }, 0); | 18 ].join(''), |
| 21 </script> | 19 selection => { |
| 20 selection.document.designMode = 'on'; |
| 21 selection.document.execCommand('selectAll'); |
| 22 selection.document.execCommand('indent'); |
| 23 }, |
| 24 // Note: This is a crash test. The output HTML only reflects the current |
| 25 // behavior, which may be incorrect due to the unusual input HTML. |
| 26 [ |
| 27 '<div contenteditable="true">', |
| 28 '<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">', |
| 29 '<span>^foo<br></span>', |
| 30 'barbarbar', |
| 31 '</blockquote>', |
| 32 '<span contenteditable="false">', |
| 33 '<span contenteditable="true">|</span>', |
| 34 '<ol>bar</ol>', |
| 35 '</span>', |
| 36 '</div>' |
| 37 ].join('')), |
| 38 'The test passes if it does not crash.'); |
| 39 </script> |
| OLD | NEW |