Bug 1508989 - Enable ESLint for dom/filesystem / (automatic changes) r=Standard8
authorAdam Pucciano <aspucciano@myseneca.ca>
Wed, 05 Dec 2018 02:24:58 +0000
changeset 449351 3930f1e2fc9e26f09c9722a941cb77bb28956d0d
parent 449350 18faf33e3dc1d324dbc4566e18d4e20cf13b941f
child 449352 bd4e540b0801acb2dddeaab2e7d63d7a14f0cbc5
push id35158
push usercsabou@mozilla.com
push dateWed, 05 Dec 2018 10:19:05 +0000
treeherdermozilla-central@f1f136ea674c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8
bugs1508989
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1508989 - Enable ESLint for dom/filesystem / (automatic changes) r=Standard8 Differential Revision: https://phabricator.services.mozilla.com/D13770
.eslintignore
dom/filesystem/compat/tests/script_entries.js
dom/filesystem/compat/tests/test_basic.html
dom/filesystem/compat/tests/test_formSubmission.html
dom/filesystem/compat/tests/test_no_dnd.html
dom/filesystem/tests/filesystem_commons.js
dom/filesystem/tests/script_fileList.js
dom/filesystem/tests/test_basic.html
dom/filesystem/tests/test_bug1319088.html
dom/filesystem/tests/test_webkitdirectory.html
dom/filesystem/tests/test_worker_basic.html
dom/filesystem/tests/worker_basic.js
--- a/.eslintignore
+++ b/.eslintignore
@@ -179,17 +179,16 @@ dom/cache/test/mochitest/**
 dom/cache/test/xpcshell/**
 dom/canvas/**
 dom/console/**
 dom/crypto/**
 dom/encoding/**
 dom/events/**
 dom/fetch/**
 dom/file/**
-dom/filesystem/**
 dom/flex/**
 dom/grid/**
 dom/html/**
 dom/ipc/**
 dom/jsurl/**
 dom/localstorage/**
 dom/manifest/**
 dom/media/test/**
--- a/dom/filesystem/compat/tests/script_entries.js
+++ b/dom/filesystem/compat/tests/script_entries.js
@@ -1,47 +1,47 @@
 Cu.importGlobalProperties(["File", "Directory"]);
 
 var tmpFile, tmpDir;
 
-addMessageListener("entries.open", function (e) {
+addMessageListener("entries.open", function(e) {
   tmpFile = Cc["@mozilla.org/file/directory_service;1"]
               .getService(Ci.nsIDirectoryService)
               .QueryInterface(Ci.nsIProperties)
-              .get('TmpD', Ci.nsIFile)
-  tmpFile.append('file.txt');
+              .get("TmpD", Ci.nsIFile);
+  tmpFile.append("file.txt");
   tmpFile.createUnique(Ci.nsIFile.FILE_TYPE, 0o600);
 
   tmpDir = Cc["@mozilla.org/file/directory_service;1"]
               .getService(Ci.nsIDirectoryService)
               .QueryInterface(Ci.nsIProperties)
-              .get('TmpD', Ci.nsIFile)
+              .get("TmpD", Ci.nsIFile);
 
-  tmpDir.append('dir-test');
+  tmpDir.append("dir-test");
   tmpDir.createUnique(Ci.nsIFile.DIRECTORY_TYPE, 0o700);
 
   var file1 = tmpDir.clone();
-  file1.append('foo.txt');
+  file1.append("foo.txt");
   file1.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0o600);
 
   var dir1 = tmpDir.clone();
-  dir1.append('subdir');
+  dir1.append("subdir");
   dir1.create(Ci.nsIFile.DIRECTORY_TYPE, 0o700);
 
   var file2 = dir1.clone();
-  file2.append('bar..txt'); // Note the double ..
+  file2.append("bar..txt"); // Note the double ..
   file2.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0o600);
 
   var dir2 = dir1.clone();
-  dir2.append('subsubdir');
+  dir2.append("subsubdir");
   dir2.create(Ci.nsIFile.DIRECTORY_TYPE, 0o700);
 
   File.createFromNsIFile(tmpFile).then(function(file) {
     sendAsyncMessage("entries.opened", {
-      data: [ new Directory(tmpDir.path), file ]
+      data: [ new Directory(tmpDir.path), file ],
     });
   });
 });
 
 addMessageListener("entries.delete", function(e) {
   tmpFile.remove(true);
   tmpDir.remove(true);
   sendAsyncMessage("entries.deleted");
--- a/dom/filesystem/compat/tests/test_basic.html
+++ b/dom/filesystem/compat/tests/test_basic.html
@@ -20,27 +20,27 @@ function setup_tests() {
                                      ["dom.webkitBlink.filesystem.enabled", true]]}, next);
 }
 
 function populate_entries() {
   var url = SimpleTest.getTestFileURL("script_entries.js");
   script = SpecialPowers.loadChromeScript(url);
 
   function onOpened(message) {
-    var entries = document.getElementById('entries');
+    var entries = document.getElementById("entries");
     SpecialPowers.wrap(entries).mozSetDndFilesAndDirectories(message.data);
     next();
   }
 
   script.addMessageListener("entries.opened", onOpened);
   script.sendAsyncMessage("entries.open");
 }
 
 function test_entries() {
-  var entries = document.getElementById('entries');
+  var entries = document.getElementById("entries");
   ok("webkitEntries" in entries, "HTMLInputElement.webkitEntries");
   is(entries.webkitEntries.length, 2, "HTMLInputElement.webkitEntries.length == 2");
   is(entries.files.length, 1, "HTMLInputElement.files is still populated");
 
   for (var i = 0; i < entries.webkitEntries.length; ++i) {
     if (entries.webkitEntries[i].isFile) {
       ok(!fileEntry, "We just want 1 fileEntry");
       fileEntry = entries.webkitEntries[i];
@@ -394,17 +394,17 @@ function cleanUpTestingFiles() {
 
   script.sendAsyncMessage("entries.delete");
 }
 
 function test_getParent(entry, parentEntry, nested) {
   entry.getParent(function(e) {
     ok(e, "We have a parent Entry.");
     if (!nested) {
-      is (e, parentEntry, "Parent entry matches");
+      is(e, parentEntry, "Parent entry matches");
       next();
     } else {
       test_getParent(e, parentEntry, false);
     }
   }, function(e) {
     ok(false, "This should not happen.");
   });
 }
--- a/dom/filesystem/compat/tests/test_formSubmission.html
+++ b/dom/filesystem/compat/tests/test_formSubmission.html
@@ -24,39 +24,39 @@ var xhr;
 
 function setup_tests() {
   form = document.getElementById("form");
 
   iframe = document.getElementById("target_iframe");
   iframe.onload = function() {
     info("Frame loaded!");
     next();
-  }
+  };
 
   SpecialPowers.pushPrefEnv({"set": [["dom.input.dirpicker", true],
                                      ["dom.webkitBlink.dirPicker.enabled", true],
                                      ["dom.filesystem.pathcheck.disabled", true],
                                      ["dom.webkitBlink.filesystem.enabled", true]]}, next);
 }
 
 function populate_entries(webkitDirectory) {
   var url = SimpleTest.getTestFileURL("script_entries.js");
   script = SpecialPowers.loadChromeScript(url);
 
   if (input) {
     form.removeChild(input);
   }
 
-  input = document.createElement('input');
-  input.setAttribute('id', 'input');
-  input.setAttribute('type', 'file');
-  input.setAttribute('name', 'input');
+  input = document.createElement("input");
+  input.setAttribute("id", "input");
+  input.setAttribute("type", "file");
+  input.setAttribute("name", "input");
 
   if (webkitDirectory) {
-    input.setAttribute('webkitdirectory', 'true');
+    input.setAttribute("webkitdirectory", "true");
   }
 
   form.appendChild(input);
 
   function onOpened(message) {
     input.addEventListener("change", function() {
       next();
     }, {once: true});
--- a/dom/filesystem/compat/tests/test_no_dnd.html
+++ b/dom/filesystem/compat/tests/test_no_dnd.html
@@ -16,18 +16,18 @@ var entries;
 
 function setup_tests() {
   SpecialPowers.pushPrefEnv({"set": [["dom.webkitBlink.dirPicker.enabled", true],
                                      ["dom.filesystem.pathcheck.disabled", true],
                                      ["dom.webkitBlink.filesystem.enabled", true]]}, next);
 }
 
 function populate_entries() {
-  entries = document.createElement('input');
-  entries.setAttribute('type', 'file');
+  entries = document.createElement("input");
+  entries.setAttribute("type", "file");
   document.body.appendChild(entries);
 
   var url = SimpleTest.getTestFileURL("script_entries.js");
   script = SpecialPowers.loadChromeScript(url);
 
   function onOpened(message) {
     for (var i = 0 ; i < message.data.length; ++i) {
       if (message.data[i] instanceof File) {
--- a/dom/filesystem/tests/filesystem_commons.js
+++ b/dom/filesystem/tests/filesystem_commons.js
@@ -1,10 +1,10 @@
 function createPath(parentDir, dirOrFile) {
-  return parentDir.path + (parentDir.path == '/' ? '' : '/') + dirOrFile.name;
+  return parentDir.path + (parentDir.path == "/" ? "" : "/") + dirOrFile.name;
 }
 
 function createRelativePath(parentDir, dirOrFile) {
   let path = createPath(parentDir, dirOrFile);
   is(path[0], "/", "The full path should start with '/'");
   return path.substring(1);
 }
 
@@ -13,29 +13,29 @@ function setup_tests(aNext) {
   SpecialPowers.pushPrefEnv({"set": [["dom.input.dirpicker", true],
                                      ["dom.filesystem.pathcheck.disabled", true],
                                      ["dom.webkitBlink.dirPicker.enabled", true]]}, aNext);
 }
 
 function test_basic(aDirectory, aNext) {
   ok(aDirectory, "Directory exists.");
   ok(aDirectory instanceof Directory, "We have a directory.");
-  is(aDirectory.path, '/' + aDirectory.name, "directory.path must be '/'+name");
+  is(aDirectory.path, "/" + aDirectory.name, "directory.path must be '/'+name");
   aNext();
 }
 
 function test_getFilesAndDirectories(aDirectory, aRecursive, aNext) {
   function checkSubDir(dir) {
     return dir.getFilesAndDirectories().then(
       function(data) {
         for (var i = 0; i < data.length; ++i) {
-          ok (data[i] instanceof File || data[i] instanceof Directory, "Just Files or Directories");
+          ok(data[i] instanceof File || data[i] instanceof Directory, "Just Files or Directories");
           if (data[i] instanceof Directory) {
-            isnot(data[i].name, '/', "Subdirectory should be called with the leafname");
-            isnot(data[i].path, '/', "Subdirectory path should be called with the leafname");
+            isnot(data[i].name, "/", "Subdirectory should be called with the leafname");
+            isnot(data[i].path, "/", "Subdirectory path should be called with the leafname");
             isnot(data[i].path, dir.path, "Subdirectory path should contain the parent path.");
             is(data[i].path, createPath(dir, data[i]), "Subdirectory path should be called parentdir.path + '/' + leafname: " + data[i].path);
           }
 
           if (data[i] instanceof File) {
             is(data[i].webkitRelativePath, createRelativePath(dir, data[i]), "File.webkitRelativePath should be called: parentdir.path + '/' + file.name: " + data[i].webkitRelativePath);
           }
         }
@@ -43,19 +43,19 @@ function test_getFilesAndDirectories(aDi
     );
   }
 
   aDirectory.getFilesAndDirectories().then(
     function(data) {
       ok(data.length, "We should have some data.");
       var promises = [];
       for (var i = 0; i < data.length; ++i) {
-        ok (data[i] instanceof File || data[i] instanceof Directory, "Just Files or Directories: " + data[i].name);
+        ok(data[i] instanceof File || data[i] instanceof Directory, "Just Files or Directories: " + data[i].name);
         if (data[i] instanceof Directory) {
-          isnot(data[i].name, '/', "Subdirectory should be called with the leafname");
+          isnot(data[i].name, "/", "Subdirectory should be called with the leafname");
           is(data[i].path, createPath(aDirectory, data[i]), "Subdirectory path should be called parentdir.path + '/' + leafname: " + data[i].path);
           if (aRecursive) {
             promises.push(checkSubDir(data[i]));
           }
         }
 
         if (data[i] instanceof File) {
           is(data[i].webkitRelativePath, createRelativePath(aDirectory, data[i]), "File.webkitRelativePath should be called file.name: " + data[i].webkitRelativePath);
@@ -70,34 +70,34 @@ function test_getFilesAndDirectories(aDi
   ).then(aNext);
 }
 
 function test_getFiles(aDirectory, aRecursive, aNext) {
   aDirectory.getFiles(aRecursive).then(
     function(data) {
       for (var i = 0; i < data.length; ++i) {
         ok(data[i] instanceof File, "File: " + data[i].name);
-        is(aDirectory.path[0], '/', "Directory path must start with '/'");
+        is(aDirectory.path[0], "/", "Directory path must start with '/'");
         ok(data[i].webkitRelativePath.indexOf(aDirectory.path.substring(1)) == 0 &&
-           data[i].webkitRelativePath.indexOf('/' + data[i].name) + ('/' + data[i].name).length == data[i].webkitRelativePath.length,
+           data[i].webkitRelativePath.indexOf("/" + data[i].name) + ("/" + data[i].name).length == data[i].webkitRelativePath.length,
            "File.webkitRelativePath should be called dir.path + '/' + file.name: " + data[i].webkitRelativePath);
       }
     },
     function() {
       ok(false, "Something when wrong");
     }
   ).then(aNext);
 }
 
 function test_getFiles_recursiveComparison(aDirectory, aNext) {
   aDirectory.getFiles(true).then(function(data) {
     is(data.length, 2, "Only 2 files for this test.");
-    ok(data[0].name == 'foo.txt' || data[0].name == 'bar.txt', "First filename matches");
-    ok(data[1].name == 'foo.txt' || data[1].name == 'bar.txt', "Second filename matches");
+    ok(data[0].name == "foo.txt" || data[0].name == "bar.txt", "First filename matches");
+    ok(data[1].name == "foo.txt" || data[1].name == "bar.txt", "Second filename matches");
   }).then(function() {
     return aDirectory.getFiles(false);
   }).then(function(data) {
     is(data.length, 1, "Only 1 file for this test.");
-    ok(data[0].name == 'foo.txt' || data[0].name == 'bar.txt', "First filename matches");
+    ok(data[0].name == "foo.txt" || data[0].name == "bar.txt", "First filename matches");
   }).catch(function() {
     ok(false, "Something when wrong");
   }).then(aNext);
 }
--- a/dom/filesystem/tests/script_fileList.js
+++ b/dom/filesystem/tests/script_fileList.js
@@ -1,15 +1,15 @@
 Cu.importGlobalProperties(["File"]);
 
 function createProfDFile() {
   return Cc["@mozilla.org/file/directory_service;1"]
            .getService(Ci.nsIDirectoryService)
            .QueryInterface(Ci.nsIProperties)
-           .get('ProfD', Ci.nsIFile);
+           .get("ProfD", Ci.nsIFile);
 }
 
 // Creates a parametric arity directory hierarchy as a function of depth.
 // Each directory contains one leaf file, and subdirectories of depth [1, depth).
 // e.g. for depth 3:
 //
 // subdir3
 // - file.txt
@@ -21,27 +21,27 @@ function createProfDFile() {
 //   - file.txt
 //
 // Returns the parent directory of the subtree.
 function createTreeFile(depth, parent) {
   if (!parent) {
     parent = Cc["@mozilla.org/file/directory_service;1"]
                 .getService(Ci.nsIDirectoryService)
                 .QueryInterface(Ci.nsIProperties)
-                .get('TmpD', Ci.nsIFile);
-    parent.append('dir-tree-test');
+                .get("TmpD", Ci.nsIFile);
+    parent.append("dir-tree-test");
     parent.createUnique(Ci.nsIFile.DIRECTORY_TYPE, 0o700);
   }
 
   var nextFile = parent.clone();
   if (depth == 0) {
-    nextFile.append('file.txt');
+    nextFile.append("file.txt");
     nextFile.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0o600);
   } else {
-    nextFile.append('subdir' + depth);
+    nextFile.append("subdir" + depth);
     nextFile.createUnique(Ci.nsIFile.DIRECTORY_TYPE, 0o700);
     // Decrement the maximal depth by one for each level of nesting.
     for (i = 0; i < depth; i++) {
       createTreeFile(i, nextFile);
     }
   }
 
   return parent;
@@ -62,65 +62,65 @@ function createRootFile() {
 
   return testFile;
 }
 
 function createTestFile() {
   var tmpFile = Cc["@mozilla.org/file/directory_service;1"]
                   .getService(Ci.nsIDirectoryService)
                   .QueryInterface(Ci.nsIProperties)
-                  .get('TmpD', Ci.nsIFile)
-  tmpFile.append('dir-test');
+                  .get("TmpD", Ci.nsIFile);
+  tmpFile.append("dir-test");
   tmpFile.createUnique(Ci.nsIFile.DIRECTORY_TYPE, 0o700);
 
   var file1 = tmpFile.clone();
-  file1.append('foo.txt');
+  file1.append("foo.txt");
   file1.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0o600);
 
   var dir = tmpFile.clone();
-  dir.append('subdir');
+  dir.append("subdir");
   dir.create(Ci.nsIFile.DIRECTORY_TYPE, 0o700);
 
   var file2 = dir.clone();
-  file2.append('bar.txt');
+  file2.append("bar.txt");
   file2.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0o600);
 
   return tmpFile;
 }
 
-addMessageListener("dir.open", function (e) {
+addMessageListener("dir.open", function(e) {
   var testFile;
 
   switch (e.path) {
-    case 'ProfD':
+    case "ProfD":
       // Note that files in the profile directory are not guaranteed to persist-
       // see bug 1284742.
       testFile = createProfDFile();
       break;
 
-    case 'root':
+    case "root":
       testFile = createRootFile();
       break;
 
-    case 'test':
+    case "test":
       testFile = createTestFile();
       break;
 
-    case 'tree':
+    case "tree":
       testFile = createTreeFile(3);
       break;
   }
 
   sendAsyncMessage("dir.opened", {
     dir: testFile.path,
-    name: testFile.leafName
+    name: testFile.leafName,
   });
 });
 
-addMessageListener("file.open", function (e) {
+addMessageListener("file.open", function(e) {
   var testFile = Cc["@mozilla.org/file/directory_service;1"]
                    .getService(Ci.nsIDirectoryService)
                    .QueryInterface(Ci.nsIProperties)
                    .get("ProfD", Ci.nsIFile);
   testFile.append("prefs.js");
 
   File.createFromNsIFile(testFile).then(function(file) {
     sendAsyncMessage("file.opened", { file });
--- a/dom/filesystem/tests/test_basic.html
+++ b/dom/filesystem/tests/test_basic.html
@@ -9,26 +9,26 @@
 
 <body>
 <script type="application/javascript">
 
 var directory;
 var fileList;
 
 function create_fileList(aPath) {
-  fileList = document.createElement('input');
-  fileList.setAttribute('type', 'file');
+  fileList = document.createElement("input");
+  fileList.setAttribute("type", "file");
   document.body.appendChild(fileList);
 
   var url = SimpleTest.getTestFileURL("script_fileList.js");
   var script = SpecialPowers.loadChromeScript(url);
 
   function onOpened(message) {
     SpecialPowers.wrap(fileList).mozSetDirectory(message.dir);
-    fileList.setAttribute('data-name', message.name);
+    fileList.setAttribute("data-name", message.name);
 
     fileList.getFilesAndDirectories().then(function(array) {
       is(array.length, 1, "We want just 1 directory.");
       ok(array[0] instanceof Directory, "We want just 1 directory.");
 
       directory = array[0];
       script.destroy();
       next();
@@ -71,88 +71,88 @@ function test_duplicateGetFilesAndDirect
 
     isnot(p1, p2, "We create 2 different promises");
 
     script.destroy();
     next();
   }
 
   script.addMessageListener("dir.opened", onOpened);
-  script.sendAsyncMessage("dir.open", { path: 'test' });
+  script.sendAsyncMessage("dir.open", { path: "test" });
 }
 
 function test_inputGetFiles() {
   var url = SimpleTest.getTestFileURL("script_fileList.js");
   var script = SpecialPowers.loadChromeScript(url);
 
   function onOpened(message) {
     SpecialPowers.wrap(fileList).mozSetDirectory(message.dir);
-    fileList.setAttribute('data-name', message.name);
+    fileList.setAttribute("data-name", message.name);
 
     fileList.getFilesAndDirectories()
     .then(function(result) {
        is(result.length, 1, "getFilesAndDirectories should return 1 element");
        ok(result[0] instanceof Directory, "getFilesAndDirectories should return 1 directory");
 
       return fileList.getFiles(false);
     })
     .then(function(result) {
       is(result.length, 1, "getFiles should return 1 element");
       ok(result[0] instanceof File, "getFile should return 1 file");
-      is(result[0].name, 'foo.txt', "getFiles()[0].name should be 'foo.txt'");
-      is(result[0].webkitRelativePath, fileList.dataset.name + '/foo.txt', "getFiles()[0].webkitRelativePath should be '/foo.txt'");
+      is(result[0].name, "foo.txt", "getFiles()[0].name should be 'foo.txt'");
+      is(result[0].webkitRelativePath, fileList.dataset.name + "/foo.txt", "getFiles()[0].webkitRelativePath should be '/foo.txt'");
 
       return fileList.getFiles(true);
     })
     .then(function(result) {
       is(result.length, 2, "getFiles should return 2 elements");
 
       function checkFile(file) {
         ok(file instanceof File, "getFile[x] should return a file");
-        if (file.name == 'foo.txt') {
-          is(file.webkitRelativePath, fileList.dataset.name + '/foo.txt', "getFiles()[x].webkitRelativePath should be '/foo.txt'");
+        if (file.name == "foo.txt") {
+          is(file.webkitRelativePath, fileList.dataset.name + "/foo.txt", "getFiles()[x].webkitRelativePath should be '/foo.txt'");
         } else {
-          is(file.name, 'bar.txt', "getFiles()[x].name should be 'bar.txt'");
-          is(file.webkitRelativePath, fileList.dataset.name + '/subdir/bar.txt', "getFiles()[x].webkitRelativePath should be '/subdir/bar.txt'");
+          is(file.name, "bar.txt", "getFiles()[x].name should be 'bar.txt'");
+          is(file.webkitRelativePath, fileList.dataset.name + "/subdir/bar.txt", "getFiles()[x].webkitRelativePath should be '/subdir/bar.txt'");
         }
       }
 
       checkFile(result[0]);
       checkFile(result[1]);
     })
     .then(function() {
       script.destroy();
       next();
     });
   }
 
   script.addMessageListener("dir.opened", onOpened);
-  script.sendAsyncMessage("dir.open", { path: 'test' });
+  script.sendAsyncMessage("dir.open", { path: "test" });
 }
 
 var tests = [
   function() { setup_tests(next); },
 
-  function() { create_fileList('tree') },
+  function() { create_fileList("tree"); },
   function() { test_basic(directory, next); },
   function() { test_getFilesAndDirectories(directory, true, next); },
   function() { test_getFiles(directory, false, next); },
   function() { test_getFiles(directory, true, next); },
 
-  function() { create_fileList('test') },
+  function() { create_fileList("test"); },
   function() { test_getFiles_recursiveComparison(directory, next); },
 
-  function() { create_fileList('root'); },
+  function() { create_fileList("root"); },
   function() { test_basic(directory, next); },
   function() { test_getFilesAndDirectories(directory, false, next); },
   function() { test_getFiles(directory, false, next); },
 
   test_duplicateGetFilesAndDirectories,
   test_inputGetFiles,
-  test_simpleFilePicker
+  test_simpleFilePicker,
 ];
 
 function next() {
   if (!tests.length) {
     SimpleTest.finish();
     return;
   }
 
--- a/dom/filesystem/tests/test_bug1319088.html
+++ b/dom/filesystem/tests/test_bug1319088.html
@@ -31,17 +31,17 @@ function populateInputFile() {
   script.addMessageListener("file.opened", onOpened);
   script.sendAsyncMessage("file.open");
 }
 
 function checkBug() {
   var input = document.getElementById("input");
   is(input.files[0].webkitRelativePath, "", "No relative path!");
 
-  let form = document.createElement('form');
+  let form = document.createElement("form");
   form.appendChild(input);
 
   is(input.files[0].webkitRelativePath, "", "No relative path!");
   SimpleTest.finish();
 }
 
 var tests = [
   testSetup,
--- a/dom/filesystem/tests/test_webkitdirectory.html
+++ b/dom/filesystem/tests/test_webkitdirectory.html
@@ -20,28 +20,28 @@ function populateInputFile(aInputFile) {
 
   var MockFilePicker = SpecialPowers.MockFilePicker;
   MockFilePicker.init(window, "A Mock File Picker", SpecialPowers.Ci.nsIFilePicker.modeOpen);
 
   function onOpened(message) {
     MockFilePicker.useDirectory(message.dir);
 
     var input = document.getElementById(aInputFile);
-    input.setAttribute('data-name', message.name);
-    input.addEventListener('change', function() {
+    input.setAttribute("data-name", message.name);
+    input.addEventListener("change", function() {
       MockFilePicker.cleanup();
       script.destroy();
       next();
     }, {once: true});
 
     input.click();
   }
 
   script.addMessageListener("dir.opened", onOpened);
-  script.sendAsyncMessage("dir.open", { path: 'test' });
+  script.sendAsyncMessage("dir.open", { path: "test" });
 }
 
 function checkFile(file, fileList, dirName) {
   for (var i = 0; i < fileList.length; ++i) {
     ok(fileList[i] instanceof File, "We want just files.");
     if (fileList[i].name == file.name) {
       is(fileList[i].webkitRelativePath, dirName + file.path, "Path matches");
       return;
@@ -96,17 +96,17 @@ function test_changeDataWhileWorking() {
   // Let's start retrieving the root nsIFile object
   new Promise(function(resolve) {
     function onOpened(message) {
       script.removeMessageListener("dir.opened", onOpened);
       resolve(message.dir);
     }
 
     script.addMessageListener("dir.opened", onOpened);
-    script.sendAsyncMessage("dir.open", { path: 'root' });
+    script.sendAsyncMessage("dir.open", { path: "root" });
   })
 
   // input.click() pointing to the root dir
   .then(function(aDir) {
     MockFilePicker.cleanup();
     MockFilePicker.init(window, "A Mock File Picker", SpecialPowers.Ci.nsIFilePicker.modeOpen);
     MockFilePicker.useDirectory(aDir);
     var input = document.getElementById("inputFileDirectoryChange");
@@ -118,61 +118,61 @@ function test_changeDataWhileWorking() {
     return new Promise(function(resolve) {
       function onOpened(message) {
         script.removeMessageListener("dir.opened", onOpened);
         script.destroy();
         resolve(message.dir);
       }
 
       script.addMessageListener("dir.opened", onOpened);
-      script.sendAsyncMessage("dir.open", { path: 'test' });
+      script.sendAsyncMessage("dir.open", { path: "test" });
     });
   })
 
   // Now let's click again and wait for onchange.
   .then(function(aDir) {
     return new Promise(function(resolve) {
       MockFilePicker.cleanup();
       MockFilePicker.init(window, "A Mock File Picker", SpecialPowers.Ci.nsIFilePicker.modeOpen);
       MockFilePicker.useDirectory(aDir);
 
       var input = document.getElementById("inputFileDirectoryChange");
-      input.addEventListener('change', function() {
+      input.addEventListener("change", function() {
         MockFilePicker.cleanup();
         resolve();
       });
 
       input.click();
-    })
+    });
   })
 
   .then(function() {
-    test_fileList('inputFileWebkitDirectory', testDirData);
+    test_fileList("inputFileWebkitDirectory", testDirData);
   });
 }
 
 function test_setup() {
   SpecialPowers.pushPrefEnv({"set": [["dom.input.dirpicker", true],
                                      ["dom.filesystem.pathcheck.disabled", true],
                                      ["dom.webkitBlink.dirPicker.enabled", true]]}, next);
 }
 
-var testDirData = [ { name: 'foo.txt', path: '/foo.txt' },
-                    { name: 'bar.txt', path: '/subdir/bar.txt' }];
+var testDirData = [ { name: "foo.txt", path: "/foo.txt" },
+                    { name: "bar.txt", path: "/subdir/bar.txt" }];
 
 var tests = [
   test_setup,
 
-  function() { populateInputFile('inputFileWebkitDirectory'); },
-  function() { populateInputFile('inputFileWebkitDirectoryAndDirectory'); },
-  function() { populateInputFile('inputFileDirectory'); },
+  function() { populateInputFile("inputFileWebkitDirectory"); },
+  function() { populateInputFile("inputFileWebkitDirectoryAndDirectory"); },
+  function() { populateInputFile("inputFileDirectory"); },
 
-  function() { test_fileList('inputFileWebkitDirectory', testDirData) },
-  function() { test_fileList('inputFileWebkitDirectoryAndDirectory', testDirData) },
-  function() { test_fileList('inputFileDirectory', null); },
+  function() { test_fileList("inputFileWebkitDirectory", testDirData); },
+  function() { test_fileList("inputFileWebkitDirectoryAndDirectory", testDirData); },
+  function() { test_fileList("inputFileDirectory", null); },
 
   test_webkitdirectory_attribute,
 
   test_changeDataWhileWorking,
 ];
 
 function next() {
   if (!tests.length) {
--- a/dom/filesystem/tests/test_worker_basic.html
+++ b/dom/filesystem/tests/test_worker_basic.html
@@ -8,46 +8,46 @@
 </head>
 
 <body>
 <script type="application/javascript">
 
 var fileList;
 
 function create_fileList() {
-  fileList = document.createElement('input');
-  fileList.setAttribute('type', 'file');
+  fileList = document.createElement("input");
+  fileList.setAttribute("type", "file");
   document.body.appendChild(fileList);
 
   var url = SimpleTest.getTestFileURL("script_fileList.js");
   var script = SpecialPowers.loadChromeScript(url);
 
   function onOpened(message) {
     SpecialPowers.wrap(fileList).mozSetDirectory(message.dir);
     script.destroy();
     next();
   }
 
   script.addMessageListener("dir.opened", onOpened);
-  script.sendAsyncMessage("dir.open", { path: 'test' });
+  script.sendAsyncMessage("dir.open", { path: "test" });
 }
 
 function test_worker() {
   fileList.getFilesAndDirectories().then(function(array) {
-    var worker = new Worker('worker_basic.js');
+    var worker = new Worker("worker_basic.js");
     worker.onmessage = function(e) {
-      if (e.data.type == 'finish') {
+      if (e.data.type == "finish") {
         next();
         return;
       }
 
-      if (e.data.type == 'test') {
+      if (e.data.type == "test") {
         ok(e.data.test, e.data.message);
       }
-    }
+    };
 
     worker.postMessage(array[0]);
   });
 }
 
 var tests = [
   function() { setup_tests(next); },
 
--- a/dom/filesystem/tests/worker_basic.js
+++ b/dom/filesystem/tests/worker_basic.js
@@ -1,16 +1,16 @@
-importScripts('filesystem_commons.js');
+importScripts("filesystem_commons.js");
 
 function finish() {
-  postMessage({ type: 'finish' });
+  postMessage({ type: "finish" });
 }
 
 function ok(a, msg) {
-  postMessage({ type: 'test', test: !!a, message: msg });
+  postMessage({ type: "test", test: !!a, message: msg });
 }
 
 function is(a, b, msg) {
   ok(a === b, msg);
 }
 
 function isnot(a, b, msg) {
   ok(a != b, msg);
@@ -33,9 +33,9 @@ function next() {
   test();
 }
 
 var directory;
 
 onmessage = function(e) {
   directory = e.data;
   next();
-}
+};