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

Side by Side Diff: LayoutTests/fast/files/workers/resources/worker-read-file-constructor-async.js

Issue 349633005: Expose FileList in Worker contexts. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Test improvements Created 6 years, 5 months 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
1 importScripts("../../resources/read-common.js") 1 importScripts("../../resources/read-common.js")
2 2
3 function log(message) 3 function log(message)
4 { 4 {
5 postMessage(message); 5 postMessage(message);
6 } 6 }
7 7
8 function readFiles(index, files) 8 function readFiles(index, files)
9 { 9 {
10 if (index >= files.length) { 10 if (index >= files.length) {
(...skipping 14 matching lines...) Expand all
25 log("Length: " + reader.result.byteLength); 25 log("Length: " + reader.result.byteLength);
26 readFiles(index + 1, files); 26 readFiles(index + 1, files);
27 }; 27 };
28 if (isText) 28 if (isText)
29 reader.readAsText(files[index]); 29 reader.readAsText(files[index]);
30 else 30 else
31 reader.readAsArrayBuffer(files[index]) 31 reader.readAsArrayBuffer(files[index])
32 } 32 }
33 33
34 onmessage = function (e) { 34 onmessage = function (e) {
35 log('Received files in worker'); 35 log("Received files in worker");
36 readFiles(0, e.data); 36 readFiles(0, e.data);
37 }; 37 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698