Index: LayoutTests/fast/files/workers/worker-read-file-async.html |
diff --git a/LayoutTests/fast/files/workers/worker-read-file-async.html b/LayoutTests/fast/files/workers/worker-read-file-async.html |
index 5c52cb13fc91a66a3d137bc614d29c4954c007d7..39a441bd2e23fe733f2a57d3f736670ec0ee35ab 100644 |
--- a/LayoutTests/fast/files/workers/worker-read-file-async.html |
+++ b/LayoutTests/fast/files/workers/worker-read-file-async.html |
@@ -1,7 +1,7 @@ |
<!DOCTYPE html> |
<html> |
<body> |
-<input type="file" name="file" id="file" onchange="onInputFileChange(testFileInfoList)" multiple> |
+<input type="file" name="file" id="file" onchange="onInputFileListChanged()" multiple> |
<pre id='console'></pre> |
<script src="../resources/setup-for-read-common.js"></script> |
@@ -17,6 +17,15 @@ var testFileInfoList = [ |
{ 'name': 'binary-file', 'path': '../resources/binary-file' }, |
]; |
+function onInputFileListChanged() |
+{ |
+ var files = document.getElementById("file").files; |
+ var namesOnly = testFileInfoList.map(function(fileSpec) { return fileSpec['name']; }); |
+ // Send both the FileList and the File names along. Worker will construct |
+ // a name => File mapping of the cloned result. |
+ startTest([files, namesOnly]); |
+} |
+ |
function startTest(testFiles) |
{ |
startWorker(testFiles, "resources/worker-read-file-async.js"); |