| OLD | NEW |
| (Empty) |
| 1 description("Tests the properties of the RangeException object.") | |
| 2 | |
| 3 var e; | |
| 4 try { | |
| 5 document.createRange().setStartAfter(document, 0); | |
| 6 // raises INVALID_NODE_TYPE_ERR | |
| 7 } catch (err) { | |
| 8 e = err; | |
| 9 } | |
| 10 | |
| 11 shouldBeEqualToString("e.toString()", "Error: INVALID_NODE_TYPE_ERR: DOM Range E
xception 2"); | |
| 12 shouldBeEqualToString("Object.prototype.toString.call(e)", "[object RangeExcepti
on]"); | |
| 13 shouldBeEqualToString("Object.prototype.toString.call(e.__proto__)", "[object Ra
ngeExceptionPrototype]"); | |
| 14 shouldBeEqualToString("e.constructor.toString()", "[object RangeExceptionConstru
ctor]"); | |
| 15 shouldBe("e.constructor", "window.RangeException"); | |
| 16 shouldBe("e.INVALID_NODE_TYPE_ERR", "e.constructor.INVALID_NODE_TYPE_ERR"); | |
| 17 shouldBe("e.BAD_BOUNDARYPOINTS_ERR", "1"); | |
| 18 shouldBe("e.INVALID_NODE_TYPE_ERR", "2"); | |
| OLD | NEW |