3 <p>This test that the loadstart event is fired for XMLHttpRequestUpload objects.
</p>
4 <pre id='console'
></pre>
5 <script type=
"text/javascript">
6 if (window
.testRunner
) {
7 testRunner
.dumpAsText();
8 testRunner
.waitUntilDone();
13 document
.getElementById('console').appendChild(document
.createTextNode(message
+ "\n"));
18 function loadstartHandler(evt
)
20 log("PASS: loadstart event fired on XMLHttpRequestUpload.");
23 function readystatechangeHandler(evt
)
25 if (xhr
.readyState
== xhr
.DONE
) {
26 if (window
.testRunner
)
27 testRunner
.notifyDone();
31 xhr
= new XMLHttpRequest
;
32 xhr
.upload
.onloadstart
= loadstartHandler
;
33 xhr
.onreadystatechange
= readystatechangeHandler
;
34 xhr
.open("POST", "resources/post-echo.cgi", true);