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

Side by Side Diff: third_party/WebKit/LayoutTests/paint/invalidation/multiple-body-remove-selection-crash.html

Issue 2150933002: Fix crash when removing contents from a document having multiple bodies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 5 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 | third_party/WebKit/LayoutTests/paint/invalidation/multiple-body-remove-selection-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 <!-- Passes if doesn't crash -->
3 <head>
4 <script>
5 if (window.testRunner)
6 testRunner.dumpAsText();
7
8 document.getElementsByTagName('script')[0].remove();
9 document.addEventListener('selectionchange', function() {
10 getSelection().deleteFromDocument();
11 });
12 onload = function() {
13 var newBody = document.body;
14 // This will create a new <body> and an empty <head>.
15 newBody.outerHTML = '';
16 newBody.className = 'new-body';
17 document.documentElement.insertBefore(newBody, document.head.nextSibling);
18 document.execCommand("SelectAll", false);
19 document.getElementsByTagName('body')[1].outerHTML = '';
20 getSelection().getRangeAt(0).extractContents();
21 };
22 </script>
23 <style>
24 * { -webkit-appearance: radio }
25 .new-body { backface-visibility: hidden }
26 </style>
27 </head>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/paint/invalidation/multiple-body-remove-selection-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698