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

Side by Side Diff: LayoutTests/fast/dom/Range/surroundContents-for-invalid-state-error.html

Issue 441853003: Range.surroundContents should throw InvalidStateError if a non-Text node is partially contained (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-invalid-state-error-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='test'>
7 <p id='start'>start</p>
8 <p id='end'>end</p>
9 </div>
10 <script>
11 var range = document.createRange();
12 var start = document.getElementById('start');
13 var end = document.getElementById('end');
14 range.setStart(start.firstChild, 0);
15 range.setEnd(end.firstChild, 0);
16
17 shouldThrow("range.surroundContents(start)", '"InvalidStateError: Failed to exec ute \'surroundContents\' on \'Range\': The Range has partially selected a non-Te xt node."');
18
19 if (window.testRunner)
20 document.getElementById('test').outerHTML = '';
21 </script>
22 </body>
23 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Range/surroundContents-for-invalid-state-error-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698