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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/selection/deleteFromDocument-after-document-open-crash.html

Issue 1637323002: Editing: Tidy up HTML document structure before execCommand(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert the Node.cpp change Created 4 years, 11 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 <html> 1 <html>
2 <head> 2 <head>
3 <script> 3 <script>
4 4
5 if (window.testRunner) 5 if (window.testRunner)
6 testRunner.dumpAsText(); 6 testRunner.dumpAsText();
7 7
8 function run() { 8 function run() {
9 selection = window.getSelection(); 9 selection = window.getSelection();
10 range = document.createRange(); 10 range = document.createRange();
11 selection.addRange(range); 11 selection.addRange(range);
12 12
13 document.designMode = "on"; 13 document.designMode = "on";
14 document.execCommand("InsertText", false, 'x'); 14 document.execCommand("InsertText", false, 'x');
15 document.open(); 15 document.open();
16 document.execCommand("Undo"); 16 document.execCommand("Undo");
17 17
18 selection.deleteFromDocument(); 18 selection.deleteFromDocument();
19 19
20 document.write('This calling deleteFromDocument after document.open. WebKit should not crash.<br>'); 20 document.body.innerHTML = 'This calling deleteFromDocument after document.op en. WebKit should not crash.<br>PASS';
21 document.write('PASS<br>');
22 } 21 }
23 </script> 22 </script>
24 </head> 23 </head>
25 <body onload="run()"> 24 <body onload="run()">
26 </body> 25 </body>
27 </html> 26 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698