Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / xmlhttprequest / infoOnProgressEvent.html
blob7bc47f452e71b08abf2d90ff5f9dabf836ead403
1 <html>
2 <head/>
3 <body>
4 <p> Test case for bug 13596: Implement .onprogress handler on XMLHttpRequest objects to support progressive download content length information </p>
5 <p> You should see type, bubble, cancelable, eventPhase, target and current target.</p>
6 <script type="text/javascript">
7 function log (msg)
9 document.body.appendChild(document.createTextNode(msg));
10 insertNewLine();
13 function insertNewLine()
15 document.body.appendChild(document.createElement("br"));
18 function onProgress(e) {
19 log("Type: " + e.type);
20 log("Bubble: " + e.bubbles);
21 log("Cancelable: " + e.cancelable);
22 log("EventPhase: " + e.eventPhase);
23 log("Target: " + e.target);
24 log("Current target: " + e.currentTarget);
25 log("Target.readyState: " + e.target.readyState);
26 e.currentTarget.onprogress = null;
27 if (window.testRunner)
28 testRunner.notifyDone();
31 if (window.testRunner) {
32 testRunner.dumpAsText();
33 testRunner.waitUntilDone();
36 var req = new XMLHttpRequest();
37 req.onprogress = onProgress;
38 req.open("GET", "resources/1251.html", true);
39 req.send(null);
40 </script>
41 </body>
42 </html>