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

Side by Side Diff: LayoutTests/fast/dom/Range/range-selection-across-documents-crash.html

Issue 9251030: Merge 104317 - Crash with range selection across different documents. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 8 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Range/range-selection-across-documents-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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script> 4 <script>
5 if (window.layoutTestController) 5 if (window.layoutTestController)
6 layoutTestController.dumpAsText(); 6 layoutTestController.dumpAsText();
7 7
8 function runTest() 8 function runTest()
9 { 9 {
10 var iframeElement = document.getElementById('iframe1'); 10 var iframeElement = document.getElementById('iframe1');
11 var iframeDocument = iframeElement.contentDocument; 11 var iframeDocument = iframeElement.contentDocument;
12 var iframeDocumentRoot = iframeDocument.documentElement; 12 var iframeDocumentRoot = iframeDocument.documentElement;
13 13
14 var selection = window.getSelection(); 14 var selection = window.getSelection();
15 var range = document.createRange(); 15 var range = document.createRange();
16 selection.addRange(range); 16 selection.addRange(range);
17 range.selectNode(iframeDocumentRoot); 17 range.selectNode(iframeDocumentRoot);
18 selection.addRange(range); 18 selection.addRange(range);
19 iframeDocument.removeChild(iframeDocumentRoot); 19 iframeDocument.removeChild(iframeDocumentRoot);
20 } 20 }
21 </script> 21 </script>
22 </head> 22 </head>
23 <body> 23 <body>
24 Test passes if it does not crash. 24 Test passes if it does not crash.
25 <iframe id="iframe1" onload="runTest()"></iframe> 25 <iframe id="iframe1" onload="runTest()"></iframe>
26 </body> 26 </body>
27 </html> 27 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Range/range-selection-across-documents-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698