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

Side by Side Diff: LayoutTests/editing/execCommand/insert-html-to-document-element-crash.html

Issue 300143012: Check nullable value before using it in ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSp (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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/insert-html-to-document-element-crash-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 <head>
3 <script>
4 if (window.testRunner)
5 testRunner.dumpAsText();
6
7 onload = function() {
8 // Make documentElement to P element without HTML and BODY.
9 var htmlElement = document.documentElement;
10 var target = document.getElementById('target');
11 document.replaceChild(target, htmlElement);
12
13 document.designMode = 'on';
14 window.getSelection().collapse(target, 0);
15 document.execCommand('InsertHTML', false, '<pre></pre>');
16
17 // Here, document.documentElement is null.
18 document.write('PASS if Blink doesn\'t crash.');
19 };
20 </script>
21 </head>
22 <body>
23 <p id="target"></p>
24 </body>
25 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/editing/execCommand/insert-html-to-document-element-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698