chromium/third_party/blink/web_tests/http/tests/xmlhttprequest/xmlhttprequest-inheritance.html

<!DOCTYPE html>
<html>
<head>
<link rel="help" href="http://www.w3.org/TR/2012/WD-XMLHttpRequest-20121206/#xmlhttprequesteventtarget">
<script src="/js-test-resources/js-test.js"></script>
</head>
<body>
<script>
description("Checks the prototype chain of XMLHttpRequest / XMLHttpRequestUpload.");

function className(obj) {
   return Object.prototype.toString.call(obj).slice(8, -1);
}

// XMLHttpRequest.
shouldBeEqualToString("XMLHttpRequest.__proto__.name", "XMLHttpRequestEventTarget");
shouldBeEqualToString("XMLHttpRequest.prototype.__proto__.constructor.name", "XMLHttpRequestEventTarget");
shouldBeEqualToString("className(XMLHttpRequest.prototype.__proto__)", "XMLHttpRequestEventTargetPrototype");
shouldBe("XMLHttpRequest.prototype.__proto__.__proto__", "EventTarget.prototype");

// XMLHttpRequestUpload.
shouldBeEqualToString("XMLHttpRequestUpload.__proto__.name", "XMLHttpRequestEventTarget");
shouldBeEqualToString("XMLHttpRequestUpload.prototype.__proto__.constructor.name", "XMLHttpRequestEventTarget");
shouldBeEqualToString("className(XMLHttpRequestUpload.prototype.__proto__)", "XMLHttpRequestEventTargetPrototype");
shouldBe("XMLHttpRequestUpload.prototype.__proto__.__proto__", "EventTarget.prototype");
</script>
</body>
</html>