| <html> |
| <head/> |
| <body> |
| <p> Test case for bug 13596: Implement .onprogress handler on XMLHttpRequest objects 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(); |
| } |
| |
| function onError(e) { |
| alert("Error " + e.target.status + " occurred while receiving the document."); |
| } |
| |
| var shouldNotify = false; |
| |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| |
| var req = new XMLHttpRequest(); |
| req.onprogress = onProgress; |
| req.open("GET", "resources/1251.html", true); |
| req.send(null); |
| </script> |
| </body> |
| </html> |