summaryrefslogtreecommitdiffstats
path: root/dom/base/test/create_file_objects.js
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base/test/create_file_objects.js')
-rw-r--r--dom/base/test/create_file_objects.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/dom/base/test/create_file_objects.js b/dom/base/test/create_file_objects.js
new file mode 100644
index 000000000..273adc2cd
--- /dev/null
+++ b/dom/base/test/create_file_objects.js
@@ -0,0 +1,10 @@
+Components.utils.importGlobalProperties(['File']);
+
+addMessageListener("create-file-objects", function(message) {
+ let files = []
+ for (fileName of message.fileNames) {
+ files.push(File.createFromFileName(fileName));
+ }
+
+ sendAsyncMessage("created-file-objects", files);
+});