Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: third_party/WebKit/LayoutTests/editing/execCommand/delete-non-editable-range-crash.html

Issue 2824633002: Reform editing/execCommand/delete-non-editable-range-crash.html (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698