29 lines
959 B
HTML
29 lines
959 B
HTML
<!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>
|