blob: a2a5516586d8757552e026db5c4a8cd193994fb9 [file] [log] [blame]
Philip Jägenstedtc053f402014-01-22 17:02:181<!DOCTYPE html>
2<html>
3<head>
Ms2ger91fef142014-11-01 09:24:374 <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ägenstedtc053f402014-01-22 17:02:189 <script src="/resources/testharness.js"></script>
James Grahama3d9d8e2014-06-09 13:06:4810 <script src="/resources/testharnessreport.js"></script>
Philip Jägenstedtc053f402014-01-22 17:02:1811 <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>