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

Side by Side Diff: LayoutTests/fast/dom/Range/surroundContents-for-mutation.html

Issue 443103002: Range.insertNode should verify parent before setting end to it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Take review comment into consideration Created 6 years, 4 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/surroundContents-for-mutation-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 <html>
2 <head>
3 <script src="../../../resources/js-test.js"></script>
4 </head>
5 <body>
6 <div id='container'>
7 <p id='start'>start</p>
8 <iframe id='test'></iframe>
9 <p id='end'>end</p>
10 </div>
11 <script>
12 var range = document.createRange();
13 var start = document.getElementById('start');
14 range.setStart(start.firstChild, 0);
15 range.setEnd(start.firstChild, 0);
16
17 function loaded(ev) {
18 var srcElement = ev.srcElement;
19 range.surroundContents(document.getElementById('end'));
20 srcElement.outerHTML = '';
21 }
22 document.addEventListener("load", loaded, true);
23
24 var testFrame = document.getElementById('test');
25 shouldThrow("range.surroundContents(testFrame)", '"HierarchyRequestError: Failed to execute \'surroundContents\' on \'Range\': This operation would set range\'s end to parent with new offset, but there\'s no parent into which to continue."' );
26
27 if (window.testRunner)
28 document.getElementById('container').outerHTML = '';
29 </script>
30 </body>
31 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Range/surroundContents-for-mutation-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698