| 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-onload" data-tested-assertations="../.." /> |
| 5 | <link rel="help" href="https://xhr.spec.whatwg.org/#event-xhr-load" data-tested-assertations="../.." /> |
| 6 | <link rel="help" href="https://xhr.spec.whatwg.org/#infrastructure-for-the-send()-method" data-tested-assertations="following::dt[11] following::a[contains(@href,'#switch-done')]/.." /> |
| 7 | <link rel="help" href="https://xhr.spec.whatwg.org/#switch-done" data-tested-assertations="following::ol/li[1] following::ol/li[6]" /> |
| 8 | <link rel="help" href="https://xhr.spec.whatwg.org/#the-response-attribute" data-tested-assertations="/following::ol/li[3]" /> |
| Philip Jägenstedt | c053f40 | 2014-01-22 17:02:18 | [diff] [blame] | 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 an event named load (no response entity body and the synchronous flag is set)</title> |
| 12 | </head> |
| 13 | |
| 14 | <body> |
| 15 | <div id="log"></div> |
| 16 | |
| 17 | <script type="text/javascript"> |
| 18 | test(function() |
| 19 | { |
| 20 | var xhr = new XMLHttpRequest(); |
| 21 | var pass = false; |
| 22 | |
| 23 | xhr.onload = function(e) |
| 24 | { |
| 25 | assert_true(e instanceof ProgressEvent); |
| 26 | assert_equals(e.type, "load"); |
| 27 | pass = true; |
| 28 | }; |
| 29 | |
| 30 | xhr.open("POST", "./resources/content.py", false); |
| 31 | xhr.send(); |
| 32 | |
| 33 | assert_equals(xhr.response, ""); |
| 34 | assert_true(pass); |
| 35 | }); |
| 36 | </script> |
| 37 | </body> |
| 38 | </html> |