3 document.getElementById('console').appendChild(document.createTextNode(message + "\n"));
4 if (message == "DONE") {
5 if (window && window.testRunner)
6 testRunner.notifyDone();
10 function onInputFileChange(testFileInfoList)
12 var files = document.getElementById("file").files;
14 for (var i = 0; i < files.length; i++)
15 testFiles[testFileInfoList[i]['name']] = files[i];
20 function runTests(testFileInfoList)
22 var pathsOnly = testFileInfoList.map(function(fileSpec) { return fileSpec['path']; });
23 eventSender.beginDragWithFiles(pathsOnly);
24 eventSender.mouseMoveTo(10, 10);
25 eventSender.mouseUp();
28 function startWorker(testFiles, workerScriptURL)
30 var worker = new Worker(workerScriptURL);
31 worker.onmessage = function(event)
34 if (event.data == "DONE") {
35 if (window.testRunner)
36 testRunner.notifyDone();
39 worker.onerror = function(event)
41 log("Received error from worker: " + event.message);
42 if (window.testRunner)
43 testRunner.notifyDone();
45 worker.postMessage(testFiles);