Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / xmlhttprequest / xmlhttprequest-inheritance.html
blob3e58fc9c6044efd6b30cf4617bf41fa96af0d75f
1 <!DOCTYPE html>
2 <html>
3 <head>
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>
6 </head>
7 <body>
8 <script>
9 description("Checks the prototype chain of XMLHttpRequest / XMLHttpRequestUpload.");
11 function className(obj) {
12 return Object.prototype.toString.call(obj).slice(8, -1);
15 // XMLHttpRequest.
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");
26 </script>
27 </body>
28 </html>