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

Side by Side Diff: LayoutTests/fast/dom/Range/range-extractContents.html

Issue 7344019: Merge 90130 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
Patch Set: Created 9 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script type="text/javascript"> 4 <script type="text/javascript">
5 function log(msg) 5 function log(msg)
6 { 6 {
7 document.body.appendChild(document.createTextNode(msg + '\n')); 7 document.body.appendChild(document.createTextNode(msg + '\n'));
8 } 8 }
9 9
10 function runTests() 10 function runTests()
11 { 11 {
12 if (window.layoutTestController) 12 if (window.layoutTestController)
13 layoutTestController.dumpAsText(); 13 layoutTestController.dumpAsText();
14 14
15 document.addEventListener("DOMSubtreeModified", function() { 15 document.addEventListener("DOMSubtreeModified", function() {
16 document.getElementById('cont').innerHTML = ''; 16 document.getElementById('cont').innerHTML = '';
17 }, false); 17 }, false);
18 18
19 var r = document.createRange(); 19 var r = document.createRange();
20 try { 20 try {
21 r.setStartBefore(document.getElementById('start')); 21 r.setStartBefore(document.getElementById('start'));
22 r.setEndAfter(document.getElementById('end')); 22 r.setEndAfter(document.getElementById('end'));
23 var fragment = r.extractContents(); 23 var fragment = r.extractContents();
24 document.body.appendChild(fragment);
25 } catch(e) { 24 } catch(e) {
26 } 25 }
27 log('PASS: No crash.'); 26 log('PASS: No crash.');
28 } 27 }
29 28
30 </script> 29 </script>
31 </head> 30 </head>
32 <body onload="runTests();"> 31 <body onload="runTests();">
33 <p id="cont"> 32 <p id="cont">
34 <span>This <span id="start">tests</span></span> 33 <span>This <span id="start">tests</span></span>
35 <span>that we don't crash when mutating the dom during</span> 34 <span>that we don't crash when mutating the dom during</span>
36 <span>an <code id="end">extractContents</code> call.</span> 35 <span>an <code id="end">extractContents</code> call.</span>
37 </p> 36 </p>
38 </body> 37 </body>
39 </html> 38 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/Range/range-extract-contents-event-fire-crash2-expected.txt ('k') | Source/WebCore/dom/Range.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698