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

Side by Side Diff: LayoutTests/editing/execCommand/crash-inserting-list.html

Issue 180003007: Fixing crash in doApplyForSingleParagraph(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressing review comments Created 6 years, 9 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
« no previous file with comments | « no previous file | LayoutTests/editing/execCommand/crash-inserting-list-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <!-- It is a minimized testcase for a Clusterfuzz test. See crbug.com/345373 -->
3 <html>
4 <head>
5 <style>
6 * { float:left; }
7 .class0 { content: url(); }
8 </style>
9 </head>
10 <body>
11 <ul class="class0">
12 <li id="r0"></li>
13 <li id="r1"></li>
14 </ul>
15 <hr/>
16 <script>
17 if (window.testRunner)
18 testRunner.dumpAsText();
19
20 var domNodeRemovedFireCount = 0;
21 document.addEventListener("DOMNodeRemoved", function () {
22 if (domNodeRemovedFireCount >= 1)
23 return;
24 domNodeRemovedFireCount++;
25 var element = event.srcElement;
26 document.execCommand('InsertOrderedList', false, false);
27
28 var parentElement = document.getElementById('r1');
29 var childElement = parentElement.childNodes[0];
30 parentElement.insertBefore(element, childElement);
31
32 document.execCommand('Undo', false, false);
33 document.execCommand('Redo', false, false);
34 document.execCommand('Outdent', false, false);
35 }, false);
36
37 document.designMode = 'on';
38 var selection = window.getSelection();
39 document.execCommand('SelectAll', false);
40 var range = selection.getRangeAt(0);
41 var insertedElement = document.getElementById('r0');
42 range.insertNode(insertedElement);
43 document.write('This test passes if the page does not crash.');
44 </script>
45 </body>
46 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/editing/execCommand/crash-inserting-list-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698