blob: b78d0649e9af2efc4c6a350ede9879961de2d614 [file] [log] [blame]
akuang@microsoft.com61b5a382012-10-26 14:19:051<!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. Steen563ff3b2013-05-23 12:11:1425 xhr.open("POST", "./resources/content.php", false);
akuang@microsoft.com61b5a382012-10-26 14:19:0526 xhr.send();
27
28 assert_equals(xhr.response, "");
29 assert_true(pass);
30 });
31 </script>
32</body>
33</html>