3 https://bugzilla.mozilla.org/show_bug.cgi?id=737612
5 <title>Test for Bug
737612</title>
6 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
7 <link rel=
"stylesheet" href=
"/tests/SimpleTest/test.css"/>
8 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=737612">Mozilla Bug
737612</a>
11 /** Test for Bug 737612 **/
12 var text
= document
.createTextNode("abc");
13 var range
= document
.createRange();
14 range
.setStart(text
, 1);
17 range
.insertNode(document
.head
);
20 is(e
.name
, "HierarchyRequestError",
21 "Must throw HierarchyRequestError");
22 is(Object
.getPrototypeOf(e
), DOMException
.prototype,
23 "Must throw DOMException");
24 is(e
.code
, DOMException
.HIERARCHY_REQUEST_ERR
,
25 "Must throw HIERARCHY_REQUEST_ERR");
27 ok(threw
, "Must throw when insertNode()ing into detached text node");