fixup!
Bug 1388082 - Switch to async/await in interaction module. r?automatedtester
--- a/testing/marionette/interaction.js
+++ b/testing/marionette/interaction.js
@@ -346,20 +346,21 @@ interaction.flushEventLoop = async funct
* file list.
*
* @param {HTMLInputElement} el
* An <tt><input type=file></tt> element.
* @param {string} path
* Full path to file.
*/
interaction.uploadFile = async function(el, path) {
+ let file;
try {
- let file = await File.createFromFileName(path);
+ file = await File.createFromFileName(path);
} catch (e) {
- return null;
+ return;
}
if (!file) {
throw new InvalidArgumentError("File not found: " + path);
}
let fs = Array.prototype.slice.call(el.files);
fs.push(file);