blob: 808df6d92341094773fc1979bb93e4a0b4adb13a [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<script src="../../resources/js-test-pre.js"></script>
<script>
description("Checks that XMLHttpRequest's properties are on the prototype and have the right properties");
var xhr = new XMLHttpRequest();
shouldBe("xhr.__proto__", "XMLHttpRequest.prototype");
debug("");
function testProperty(propertyName) {
debug("* " + propertyName);
shouldBeFalse("xhr.hasOwnProperty(propertyName)");
shouldBeTrue("xhr.__proto__.hasOwnProperty(propertyName)");
properties = Object.getOwnPropertyDescriptor(xhr.__proto__, propertyName);
shouldBeTrue("properties.configurable");
shouldBeTrue("properties.enumerable");
debug("");
}
for (var propertyName of ["readyState", "response", "responseText", "responseType", "responseURL", "responseXML", "statusText", "timeout", "upload", "withCredentials"])
testProperty(propertyName);
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>