Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Range / detach-no-op.html
blob9d44afc588d7b6df65ffdf6bb5043110980f8087
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="testLink">link</a></div>
9 <script>
10 description("Tests that Range.detach() is a no-op.");
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");
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>