Index: LayoutTests/http/tests/xmlhttprequest/workers/resources/upload-onprogress-worker.js |
diff --git a/LayoutTests/http/tests/xmlhttprequest/workers/resources/upload-onprogress-worker.js b/LayoutTests/http/tests/xmlhttprequest/workers/resources/upload-onprogress-worker.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c254f45cee8dd8c8c501ebcee2381ff3b2f6af75 |
--- /dev/null |
+++ b/LayoutTests/http/tests/xmlhttprequest/workers/resources/upload-onprogress-worker.js |
@@ -0,0 +1,29 @@ |
+importScripts("worker-pre.js"); |
+ |
+function log(message) |
+{ |
+ postMessage("log " + message); |
+} |
+ |
+function onLoad() |
+{ |
+ postMessage("DONE"); |
+} |
+ |
+function onProgress(e) |
+{ |
+ postMessage("tick " + e.loaded); |
+} |
+ |
+function init() |
+{ |
+ try { |
+ var xhr = new XMLHttpRequest(); |
+ xhr.upload.onprogress = onProgress; |
+ xhr.onload = onLoad; |
+ xhr.open("POST", "../../resources/post-echo.cgi"); |
+ xhr.send((new Array(100000)).join("aa")); |
+ } catch (e) { |
+ log("Exception received."); |
+ } |
+} |