blob: 99a239ab135d78e2a3568e6894e63939fb29f5a1 [file] [log] [blame]
Philip Jägenstedtc053f402014-01-22 17:02:181<!DOCTYPE html>
2<html>
3<head>
Ms2ger91fef142014-11-01 09:24:374 <link rel="help" href="https://xhr.spec.whatwg.org/#handler-xhr-onloadend" data-tested-assertations="../.." />
5 <link rel="help" href="https://xhr.spec.whatwg.org/#event-xhr-loadend" data-tested-assertations="../.." />
6 <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]" />
7 <link rel="help" href="https://xhr.spec.whatwg.org/#make-upload-progress-notifications" data-tested-assertations="following::ul[1]/li[2]/ol[1]/li[4]" />
Philip Jägenstedtc053f402014-01-22 17:02:188
9 <script src="/resources/testharness.js"></script>
James Grahama3d9d8e2014-06-09 13:06:4810 <script src="/resources/testharnessreport.js"></script>
Philip Jägenstedtc053f402014-01-22 17:02:1811 <title>XMLHttpRequest: The send() method: Fire a progress event named loadend on the XMLHttpRequestUpload (synchronous flag is unset)</title>
12</head>
13
14<body>
15 <div id="log"></div>
16
17 <script type="text/javascript">
18 var test = async_test();
19
20 test.step(function()
21 {
22 var xhr = new XMLHttpRequest();
23
24 xhr.upload.onloadend = function(e)
25 {
26 test.step(function()
27 {
28 assert_true(e instanceof ProgressEvent);
29 assert_equals(e.type, "loadend");
30 assert_equals(e.target, xhr.upload);
31 test.done();
32 });
33 };
34
35 xhr.open("POST", "./resources/content.py", true);
36 xhr.send("Test Message");
37 });
38 </script>
39</body>
40</html>