| Philip Jägenstedt | c053f40 | 2014-01-22 17:02:18 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| Ms2ger | 91fef14 | 2014-11-01 09:24:37 | [diff] [blame] | 4 | <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ägenstedt | c053f40 | 2014-01-22 17:02:18 | [diff] [blame] | 8 | |
| 9 | <script src="/resources/testharness.js"></script> |
| James Graham | a3d9d8e | 2014-06-09 13:06:48 | [diff] [blame] | 10 | <script src="/resources/testharnessreport.js"></script> |
| Philip Jägenstedt | c053f40 | 2014-01-22 17:02:18 | [diff] [blame] | 11 | <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> |