4 <link rel=
"help" href=
"http://www.w3.org/TR/2012/WD-XMLHttpRequest-20121206/#xmlhttprequesteventtarget">
5 <script src=
"/js-test-resources/js-test.js"></script>
9 description("Checks the prototype chain of XMLHttpRequest / XMLHttpRequestUpload.");
11 function className(obj
) {
12 return Object
.prototype.toString
.call(obj
).slice(8, -1);
16 shouldBeEqualToString("XMLHttpRequest.__proto__.name", "XMLHttpRequestEventTarget");
17 shouldBeEqualToString("XMLHttpRequest.prototype.__proto__.constructor.name", "XMLHttpRequestEventTarget");
18 shouldBeEqualToString("className(XMLHttpRequest.prototype.__proto__)", "XMLHttpRequestEventTargetPrototype");
19 shouldBe("XMLHttpRequest.prototype.__proto__.__proto__", "EventTarget.prototype");
21 // XMLHttpRequestUpload.
22 shouldBeEqualToString("XMLHttpRequestUpload.__proto__.name", "XMLHttpRequestEventTarget");
23 shouldBeEqualToString("XMLHttpRequestUpload.prototype.__proto__.constructor.name", "XMLHttpRequestEventTarget");
24 shouldBeEqualToString("className(XMLHttpRequestUpload.prototype.__proto__)", "XMLHttpRequestEventTargetPrototype");
25 shouldBe("XMLHttpRequestUpload.prototype.__proto__.__proto__", "EventTarget.prototype");