Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: LayoutTests/http/tests/xmlhttprequest/workers/resources/upload-onprogress-worker.js

Issue 71433002: Enable XHR upload progress events for Workers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add missing doctype declaration Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 importScripts("worker-pre.js");
2
3 function log(message)
4 {
5 postMessage("log " + message);
6 }
7
8 function onLoad()
9 {
10 postMessage("DONE");
11 }
12
13 function onProgress(e)
14 {
15 postMessage("tick " + e.loaded);
16 }
17
18 function init()
19 {
20 try {
21 var xhr = new XMLHttpRequest();
22 xhr.upload.onprogress = onProgress;
23 xhr.onload = onLoad;
24 xhr.open("POST", "../../resources/post-echo.cgi");
25 xhr.send((new Array(100000)).join("aa"));
26 } catch (e) {
27 log("Exception received.");
28 }
29 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698