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

Side by Side Diff: LayoutTests/fast/files/workers/resources/worker-read-file-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", "../../resources/read-file-test- cases.js", "worker-read-common.js"); 1 importScripts("../../resources/read-common.js", "../../resources/read-file-test- cases.js", "worker-read-common.js");
2 2
3 onmessage = function(event) {
4 var testFiles = event.data;
5 log("Received files in worker");
6 if (event.data[0] instanceof FileList) {
7 log("Received a FileList");
8 // The tests expects a name => File map; construct the
9 // mapping from the FileList and the test names that
10 // were posted (as a pair, using an Array.)
11 var files = event.data[0];
12 var names = event.data[1];
13 var tests = {};
14 for (var i = 0; i < files.length; i++)
15 tests[names[i]] = files[i];
16
17 testFiles = tests;
18 }
19 runNextTest(testFiles);
20 };
21
3 function isReadAsAsync() 22 function isReadAsAsync()
4 { 23 {
5 return true; 24 return true;
6 } 25 }
7
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698