| OLD | NEW | 
| (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> | 
| OLD | NEW |