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

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, 10 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
(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 </body>
17 <script>
Yuta Kitamura 2014/02/27 01:59:14 <script> cannot be a direct child of <html>. Shoul
arpitab_ 2014/02/27 05:10:07 Done.
18 window.testRunner()
Yuta Kitamura 2014/02/27 01:59:14 "if" is missing.
arpitab_ 2014/02/27 05:10:07 Done.
19 testRunner.dumpAsText();
20
21 var DOMNodeRemovedFireCount = 0;
Yuta Kitamura 2014/02/27 01:59:14 If a variable name starts with an acronym, then th
arpitab_ 2014/02/27 05:10:07 Done.
22 document.addEventListener("DOMNodeRemoved", function () {
23 if (DOMNodeRemovedFireCount >= 1)
24 return;
25 DOMNodeRemovedFireCount++;
26 var element = event.srcElement;
27 document.execCommand('InsertOrderedList', false, false);
28
29 var parentElement = document.getElementById('r1');
30 var childElement = parentElement.childNodes[0];
31 parentElement.insertBefore(element, childElement);
32
33 document.execCommand('Undo', false, false);
34 document.execCommand('Redo', false, false);
35 document.execCommand('Outdent', false, false);
36 }, false);
37
38 document.designMode = 'on';
39 var selection = window.getSelection();
40 document.execCommand('SelectAll', false);
41 var range = selection.getRangeAt(0);
42 var insertedElement = document.getElementById('r0');
43 range.insertNode(insertedElement);
44 document.write('This test passes if the page does not crash.');
45 </script>
46 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698