| akuang@microsoft.com | 61b5a38 | 2012-10-26 14:19:05 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| Hallvord Reiar M. Steen | 5a80738 | 2013-05-24 12:42:17 | [diff] [blame] | 4 | <link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#handler-xhr-onloadend" data-tested-assertations="../.." /> |
| 5 | <link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#event-xhr-loadend" data-tested-assertations="../.." /> |
| 6 | <link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#infrastructure-for-the-send()-method" data-tested-assertations="following::dt[11] following::a[contains(@href,'#switch-done')]/.." /> |
| 7 | <link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#switch-done" data-tested-assertations="following::ol/li[1] following::ol/li[7]" /> |
| 8 | <link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-response-attribute" data-tested-assertations="/following::ol/li[3]" /> |
| akuang@microsoft.com | 61b5a38 | 2012-10-26 14:19:05 | [diff] [blame] | 9 | <script src="/resources/testharness.js"></script> |
| Hallvord Reiar M. Steen | 99eeb10 | 2013-05-24 09:16:01 | [diff] [blame] | 10 | <title>XMLHttpRequest: The send() method: Fire an event named loadend (no response entity body and the synchronous flag is set)</title> |
| akuang@microsoft.com | 61b5a38 | 2012-10-26 14:19:05 | [diff] [blame] | 11 | </head> |
| 12 | |
| 13 | <body> |
| 14 | <div id="log"></div> |
| 15 | |
| 16 | <script type="text/javascript"> |
| 17 | test(function() |
| 18 | { |
| 19 | var xhr = new XMLHttpRequest(); |
| 20 | var pass = false; |
| 21 | |
| 22 | xhr.onloadend = function(e) |
| 23 | { |
| 24 | assert_true(e instanceof ProgressEvent); |
| 25 | assert_equals(e.type, "loadend"); |
| 26 | pass = true; |
| 27 | }; |
| 28 | |
| James Graham | 234a672 | 2013-09-17 17:54:38 | [diff] [blame^] | 29 | xhr.open("POST", "./resources/content.py", false); |
| akuang@microsoft.com | 61b5a38 | 2012-10-26 14:19:05 | [diff] [blame] | 30 | xhr.send(); |
| 31 | |
| 32 | assert_equals(xhr.response, ""); |
| 33 | assert_true(pass); |
| 34 | }); |
| 35 | </script> |
| 36 | </body> |
| James Graham | 234a672 | 2013-09-17 17:54:38 | [diff] [blame^] | 37 | </html> |