<html>
<head/>
<body>
<p> .onprogress handler on XMLHttpRequest objects with response type "blob" works to support progressive download content length information </p>
<p> You should see type, bubble, cancelable, eventPhase, target and current target.</p>
<script type="text/javascript">
function log (msg)
{
    document.body.appendChild(document.createTextNode(msg));
    insertNewLine();
}

function insertNewLine()
{
    document.body.appendChild(document.createElement("br"));
}

function onProgress(e) {
    log("Type: " + e.type);
    log("Bubble: " + e.bubbles);
    log("Cancelable: " + e.cancelable);
    log("EventPhase: " + e.eventPhase);
    log("Target: " + e.target);
    log("Current target: " + e.currentTarget);
    e.currentTarget.onprogress = null;
    if (window.testRunner)
        testRunner.notifyDone();
}

if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}

var req = new XMLHttpRequest();
req.responseType = "blob";
req.onprogress = onProgress;
req.open("GET", "resources/get.txt", true);
req.send(null);
</script>
</body>
</html>
