blob: 6405e0e1e50f29fa654e9bc3c1893cc5fd657645 [file] [log] [blame]
This tests the prototype chain of DOMException objects.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS e.toString() is "HierarchyRequestError: Failed to execute 'appendChild' on 'Node': Nodes of type '#document' may not be inserted inside nodes of type '#document'."
PASS Object.prototype.toString.call(e) is "[object DOMException]"
FAIL Object.prototype.toString.call(e.__proto__) should be [object DOMExceptionPrototype]. Was [object DOMException].
PASS Object.prototype.toString.call(e.__proto__.__proto__) is "[object Object]"
PASS e.constructor.toString() is "function DOMException() { [native code] }"
PASS e instanceof DOMException is true
PASS e instanceof Error is true
PASS e.constructor is window.DOMException
PASS e.HIERARCHY_REQUEST_ERR is e.constructor.HIERARCHY_REQUEST_ERR
PASS e.HIERARCHY_REQUEST_ERR is 3
PASS e.code is 3
PASS e.name is "HierarchyRequestError"
PASS e.message is "Failed to execute 'appendChild' on 'Node': Nodes of type '#document' may not be inserted inside nodes of type '#document'."
PASS successfullyParsed is true
TEST COMPLETE