| akuang@microsoft.com | 61b5a38 | 2012-10-26 14:19:05 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-send()-method" /> |
| 5 | <script src="/resources/testharness.js"></script> |
| 6 | <title>XMLHttpRequest L2: The send() method: Fire an event named loadend (no response entity body and the synchronous flag is set)</title> |
| 7 | </head> |
| 8 | |
| 9 | <body> |
| 10 | <div id="log"></div> |
| 11 | |
| 12 | <script type="text/javascript"> |
| 13 | test(function() |
| 14 | { |
| 15 | var xhr = new XMLHttpRequest(); |
| 16 | var pass = false; |
| 17 | |
| 18 | xhr.onloadend = function(e) |
| 19 | { |
| 20 | assert_true(e instanceof ProgressEvent); |
| 21 | assert_equals(e.type, "loadend"); |
| 22 | pass = true; |
| 23 | }; |
| 24 | |
| Hallvord Reiar M. Steen | 563ff3b | 2013-05-23 12:11:14 | [diff] [blame^] | 25 | xhr.open("POST", "./resources/content.php", false); |
| akuang@microsoft.com | 61b5a38 | 2012-10-26 14:19:05 | [diff] [blame] | 26 | xhr.send(); |
| 27 | |
| 28 | assert_equals(xhr.response, ""); |
| 29 | assert_true(pass); |
| 30 | }); |
| 31 | </script> |
| 32 | </body> |
| 33 | </html> |