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

Side by Side Diff: LayoutTests/fast/dom/Range/detach-no-op.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 <!DOCTYPE html>
2 <html>
3 <head>
4 <link rel="help" href="http://dom.spec.whatwg.org/#dom-range-detach">
5 <script src="../../../resources/js-test.js"></script>
6 </head>
7 <body>
8 <div id="div" contenteditable="true">test<a href="http://www.google.com/" id="te stLink">link</a></div>
9 <script>
10 description("Tests that Range.detach() is a no-op.");
11
12 function checkInvariance() {
13 shouldBe("range.startContainer", "link");
14 shouldBe("range.startOffset", "0");
15 shouldBe("range.endContainer", "link");
16 shouldBe("range.endOffset", "0");
17 shouldBeTrue("range.collapsed");
18 shouldBe("range.commonAncestorContainer", "link");
19 }
20
21 var range = new Range();
22 var link = document.getElementById("testLink");
23 range.setStart(link, 0);
24 range.setEnd(link, 0);
25 checkInvariance();
26 shouldNotThrow("range.detach()");
27 checkInvariance();
28 </script>
29 </body>
30 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/Range/bug-19527.html ('k') | LayoutTests/fast/dom/Range/detach-no-op-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698