blob: 98c76cc3fc33dfdda64672d209183d0598246e21 [file] [log] [blame]
Andrew Top61a84952019-04-30 15:07:33 -07001<!doctype html>
2<html lang=en>
3<meta charset=utf-8>
4<title>XMLHttpRequest: upload progress event</title>
5<script src="/resources/testharness.js"></script>
6<script src="/resources/testharnessreport.js"></script>
7 <link rel="help" href="https://xhr.spec.whatwg.org/#handler-xhr-onprogress" data-tested-assertations="../.." />
8 <link rel="help" href="https://xhr.spec.whatwg.org/#the-send()-method" data-tested-assertations="following::*//a[contains(@href,'#make-upload-progress-notifications')] following::ol[1]/li[8]" />
9 <link rel="help" href="https://xhr.spec.whatwg.org/#make-upload-progress-notifications" data-tested-assertations=".. ../following::ul/li[1]" />
10 <link rel="help" href="https://xhr.spec.whatwg.org/#dom-xmlhttprequest-upload" data-tested-assertations=".." />
11
12<div id="log"></div>
13<script>
14 var test = async_test();
15 test.step(function() {
16 var client = new XMLHttpRequest();
17 client.upload.onprogress = test.step_func(function() {
18 test.done();
19 });
20 client.onreadystatechange = test.step_func(function() {
21 if (client.readyState === 4) assert_unreached("onprogress not called.");
22 });
23 client.open("POST", "resources/upload.py");
24 client.send("This is a test string.");
25 });
26</script>