blob: 3b26bd098147fd1742ef42bba434ae15008a4d5c [file] [log] [blame]
akuang@microsoft.com61b5a382012-10-26 14:19:051<!DOCTYPE html>
2<html>
3<head>
Hallvord Reiar M. Steen5a807382013-05-24 12:42:174 <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.com61b5a382012-10-26 14:19:059 <script src="/resources/testharness.js"></script>
Hallvord Reiar M. Steen99eeb102013-05-24 09:16:0110 <title>XMLHttpRequest: The send() method: Fire an event named loadend (no response entity body and the synchronous flag is set)</title>
akuang@microsoft.com61b5a382012-10-26 14:19:0511</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 Graham234a6722013-09-17 17:54:3829 xhr.open("POST", "./resources/content.py", false);
akuang@microsoft.com61b5a382012-10-26 14:19:0530 xhr.send();
31
32 assert_equals(xhr.response, "");
33 assert_true(pass);
34 });
35 </script>
36</body>
James Graham234a6722013-09-17 17:54:3837</html>