OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <link rel="help" href="http://www.w3.org/TR/2012/WD-XMLHttpRequest-20121206/#xml
httprequesteventtarget"> |
| 5 <script src="../resources/js-test-pre.js"></script> |
| 6 </head> |
| 7 <body> |
| 8 <script> |
| 9 description("Checks the prototype chain of XMLHttpRequest / XMLHttpRequestUpload
."); |
| 10 |
| 11 function className(obj) { |
| 12 return Object.prototype.toString.call(obj).slice(8, -1); |
| 13 } |
| 14 |
| 15 // XMLHttpRequest. |
| 16 shouldBeEqualToString("XMLHttpRequest.__proto__.name", "XMLHttpRequestEventTarge
t"); |
| 17 shouldBeEqualToString("XMLHttpRequest.prototype.__proto__.constructor.name", "XM
LHttpRequestEventTarget"); |
| 18 shouldBeEqualToString("className(XMLHttpRequest.prototype.__proto__)", "XMLHttpR
equestEventTargetPrototype"); |
| 19 shouldBe("XMLHttpRequest.prototype.__proto__.__proto__", "EventTarget.prototype"
); |
| 20 |
| 21 // XMLHttpRequestUpload. |
| 22 shouldBeEqualToString("XMLHttpRequestUpload.__proto__.name", "XMLHttpRequestEven
tTarget"); |
| 23 shouldBeEqualToString("XMLHttpRequestUpload.prototype.__proto__.constructor.name
", "XMLHttpRequestEventTarget"); |
| 24 shouldBeEqualToString("className(XMLHttpRequestUpload.prototype.__proto__)", "XM
LHttpRequestEventTargetPrototype"); |
| 25 shouldBe("XMLHttpRequestUpload.prototype.__proto__.__proto__", "EventTarget.prot
otype"); |
| 26 </script> |
| 27 </body> |
| 28 <script src="../resources/js-test-post.js"></script> |
| 29 </html> |
OLD | NEW |