blob: 74293dd4f36ca81d31039085d1294b5cd39c2185 [file] [log] [blame]
<html>
<body>
<p>This test that the loadstart event is fired for XMLHttpRequestUpload objects.</p>
<pre id='console'></pre>
<script type="text/javascript">
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function log(message)
{
document.getElementById('console').appendChild(document.createTextNode(message + "\n"));
}
var xhr;
function loadstartHandler(evt)
{
log("PASS: loadstart event fired on XMLHttpRequestUpload.");
}
function readystatechangeHandler(evt)
{
if (xhr.readyState == xhr.DONE) {
if (window.testRunner)
testRunner.notifyDone();
}
}
xhr = new XMLHttpRequest;
xhr.upload.onloadstart = loadstartHandler;
xhr.onreadystatechange = readystatechangeHandler;
xhr.open("POST", "resources/post-echo.cgi", true);
xhr.send("data");
</script>
</body>
</html>