blob: 834cdede791cb5ed044f5aa75d72be76c3ab339e [file] [log] [blame]
<html>
<body>
<script src="/js-test-resources/js-test.js"></script>
<script type="text/javascript">
description("Test that if responseType is set to arraybuffer, " +
"XMLHttpRequest.response is null in DONE state, after abort()-ed " +
"in LOADING state.");
window.jsTestIsAsync = true;
var xhr = new XMLHttpRequest();
xhr.responseType = 'arraybuffer';
xhr.open('GET', '../resources/test.ogv', true);
xhr.onreadystatechange = function() {
if (this.readyState == this.LOADING) {
shouldBe("xhr.status", "200");
// readyState is not DONE.
shouldBe("xhr.response", "null");
xhr.abort();
} else if (this.readyState == this.DONE) {
// readyState is DONE but error flag is set.
shouldBe("xhr.response", "null");
finishJSTest();
}
};
xhr.send(null);
</script>
</body>