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

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

Issue 252783002: Make Range.detach() a no-op (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../../../resources/js-test.js"></script>
4 </head>
5 <body>
6 <!-- hidden area to create the ranges being tested -->
7 <div style="visibility: hidden">
8 <div id=a1>a1
9 <div id=b1>b1</div>
10 </div>
11 </div>
12
13 <script>
14 description("Test for Bug: 75799 - Calling intersectsNode on a detached range sh ould throw");
15 var range = document.createRange();
16 range.selectNode(document.getElementById("a1"));
17 range.detach();
18 shouldThrow("range.intersectsNode(document.getElementById('b1'))", '"InvalidStat eError: Failed to execute \'intersectsNode\' on \'Range\': The range has no cont ainer. Perhaps \'detach()\' has been invoked on this object?"');
19 </script>
20 </body>
21 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698