blob: b30b03afe08bee5cacbcc63d7689a0d8c5aca1f3 [file] [log] [blame]
<!doctype html>
<title>ProgressEvent: firing events for HTTP with no Content-Length</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="help" href="" data-tested-assertations="/following-sibling::ol/li[1] /following-sibling::ol/li[2]" />
<div id="log"></div>
var test = async_test();
test.step(function() {
var xhr = new XMLHttpRequest();
xhr.onprogress = function(pe) {
test.step(function() {
if(pe.type == "progress") {
assert_true(pe.loaded >= 0, "loaded is initialize to the number of HTTP entity body bytes transferred.");
assert_false(pe.lengthComputable, "lengthComputable is false.");
assert_equals(, 0, "total is zero.");
}, "Check lengthComputed, loaded, total when Content-Length is NOT given.");
// "loadstart", "error", "abort", "load" tests are out of scope.
// They SHOULD be tested in each spec that implement ProgressEvent.
xhr.onloadend = function(pe) {
}"GET", "resources/", true);