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

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: 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
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 = '';
haraken 2014/08/05 06:34:10 What is this code for?
kangil_ 2014/08/05 06:49:58 This will clean 'start' and 'end' from the result.
21 </script>
22 </body>
23 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698