Bug 1561435 - Format storage/, a=automatic-formatting
authorVictor Porof <vporof@mozilla.com>
Fri, 05 Jul 2019 10:59:24 +0200
changeset 481414 f6fff703eb2618a94afb9018ab902ffbeaf8c199
parent 481413 168bec380944da26de7ecd53222aaf94a2d2c65b
child 481415 1e3121039456ff51e0cae5ddd297be773f22b6af
push id36243
push uservporof@mozilla.com
push dateFri, 05 Jul 2019 14:04:25 +0000
treeherdermozilla-central@041abaa4aa85 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatic-formatting
bugs1561435
milestone69.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 1561435 - Format storage/, a=automatic-formatting # ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D35935
.eslintrc.js
.prettierignore
storage/test/unit/head_storage.js
storage/test/unit/test_bug-393952.js
storage/test/unit/test_bug-429521.js
storage/test/unit/test_bug-444233.js
storage/test/unit/test_cache_size.js
storage/test/unit/test_connection_asyncClose.js
storage/test/unit/test_connection_executeAsync.js
storage/test/unit/test_connection_executeSimpleSQLAsync.js
storage/test/unit/test_connection_failsafe_close.js
storage/test/unit/test_connection_interrupt.js
storage/test/unit/test_js_helpers.js
storage/test/unit/test_like.js
storage/test/unit/test_like_escape.js
storage/test/unit/test_locale_collation.js
storage/test/unit/test_minimizeMemory.js
storage/test/unit/test_retry_on_busy.js
storage/test/unit/test_sqlite_secure_delete.js
storage/test/unit/test_statement_executeAsync.js
storage/test/unit/test_statement_wrapper_automatically.js
storage/test/unit/test_storage_aggregates.js
storage/test/unit/test_storage_connection.js
storage/test/unit/test_storage_fulltextindex.js
storage/test/unit/test_storage_function.js
storage/test/unit/test_storage_progresshandler.js
storage/test/unit/test_storage_service.js
storage/test/unit/test_storage_service_unshared.js
storage/test/unit/test_storage_statement.js
storage/test/unit/test_storage_value_array.js
storage/test/unit/test_telemetry_vfs.js
storage/test/unit/test_unicode.js
storage/test/unit/test_vacuum.js
storage/test/unit/vacuumParticipant.js
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -40,17 +40,16 @@ module.exports = {
     "plugin:mozilla/recommended"
   ],
   "plugins": [
     "mozilla"
   ],
   "overrides": [{
       "files": [
         "devtools/**",
-        "storage/**",
         "taskcluster/**",
         "testing/**",
         "toolkit/**",
         "tools/**",
         "uriloader/**",
         "view/**",
         "widget/**",
         "xpcom/**",
--- a/.prettierignore
+++ b/.prettierignore
@@ -35,17 +35,16 @@ security/manager/ssl/security-prefs.js
 services/common/services-common.js
 services/sync/services-sync.js
 services/sync/tests/unit/prefs_test_prefs_store.js
 testing/marionette/prefs/marionette.js
 toolkit/components/telemetry/datareporting-prefs.js
 toolkit/components/telemetry/healthreport-prefs.js
 
 # Ignore all top-level directories for now.
-storage/**
 taskcluster/**
 testing/**
 toolkit/**
 tools/**
 uriloader/**
 view/**
 widget/**
 xpcom/**
--- a/storage/test/unit/head_storage.js
+++ b/storage/test/unit/head_storage.js
@@ -1,16 +1,19 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-var {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-var {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
-
+var { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
+var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { AppConstants } = ChromeUtils.import(
+  "resource://gre/modules/AppConstants.jsm"
+);
 
 do_get_profile();
 var gDBConn = null;
 
 function getTestDB() {
   var db = Services.dirsvc.get("ProfD", Ci.nsIFile);
   db.append("test_storage.sqlite");
   return db;
@@ -31,18 +34,23 @@ function getFakeDB() {
 }
 
 /**
  * Delete the test database file.
  */
 function deleteTestDB() {
   print("*** Storage Tests: Trying to remove file!");
   var dbFile = getTestDB();
-  if (dbFile.exists())
-    try { dbFile.remove(false); } catch (e) { /* stupid windows box */ }
+  if (dbFile.exists()) {
+    try {
+      dbFile.remove(false);
+    } catch (e) {
+      /* stupid windows box */
+    }
+  }
 }
 
 function cleanup() {
   // close the connection
   print("*** Storage Tests: Trying to close!");
   getOpenedDatabase().close();
 
   // we need to null out the database variable to get a new connection the next
@@ -57,17 +65,19 @@ function cleanup() {
  * Use asyncClose to cleanup a connection.  Synchronous by means of internally
  * spinning an event loop.
  */
 function asyncCleanup() {
   let closed = false;
 
   // close the connection
   print("*** Storage Tests: Trying to asyncClose!");
-  getOpenedDatabase().asyncClose(function() { closed = true; });
+  getOpenedDatabase().asyncClose(function() {
+    closed = true;
+  });
 
   let tm = Cc["@mozilla.org/thread-manager;1"].getService();
   tm.spinEventLoopUntil(() => closed);
 
   // we need to null out the database variable to get a new connection the next
   // time getOpenedDatabase is called
   gDBConn = null;
 
@@ -143,23 +153,29 @@ function createAsyncStatement(aSQL) {
  *        The function to invoke and expect an XPCOM-style error from.
  */
 function expectError(aErrorCode, aFunction) {
   let exceptionCaught = false;
   try {
     aFunction();
   } catch (e) {
     if (e.result != aErrorCode) {
-      do_throw("Got an exception, but the result code was not the expected " +
-               "one.  Expected " + aErrorCode + ", got " + e.result);
+      do_throw(
+        "Got an exception, but the result code was not the expected " +
+          "one.  Expected " +
+          aErrorCode +
+          ", got " +
+          e.result
+      );
     }
     exceptionCaught = true;
   }
-  if (!exceptionCaught)
+  if (!exceptionCaught) {
     do_throw(aFunction + " should have thrown an exception but did not!");
+  }
 }
 
 /**
  * Run a query synchronously and verify that we get back the expected results.
  *
  * @param aSQLString
  *        The SQL string for the query.
  * @param aBind
@@ -169,19 +185,26 @@ function expectError(aErrorCode, aFuncti
  *        Express blobs as lists.
  */
 function verifyQuery(aSQLString, aBind, aResults) {
   let stmt = getOpenedDatabase().createStatement(aSQLString);
   stmt.bindByIndex(0, aBind);
   try {
     Assert.ok(stmt.executeStep());
     let nCols = stmt.numEntries;
-    if (aResults.length != nCols)
-      do_throw("Expected " + aResults.length + " columns in result but " +
-               "there are only " + aResults.length + "!");
+    if (aResults.length != nCols) {
+      do_throw(
+        "Expected " +
+          aResults.length +
+          " columns in result but " +
+          "there are only " +
+          aResults.length +
+          "!"
+      );
+    }
     for (let iCol = 0; iCol < nCols; iCol++) {
       let expectedVal = aResults[iCol];
       let valType = stmt.getTypeOfIndex(iCol);
       if (expectedVal === null) {
         Assert.equal(stmt.VALUE_TYPE_NULL, valType);
         Assert.ok(stmt.getIsNull(iCol));
       } else if (typeof expectedVal == "number") {
         if (Math.floor(expectedVal) == expectedVal) {
@@ -189,19 +212,21 @@ function verifyQuery(aSQLString, aBind, 
           Assert.equal(expectedVal, stmt.getInt32(iCol));
         } else {
           Assert.equal(stmt.VALUE_TYPE_FLOAT, valType);
           Assert.equal(expectedVal, stmt.getDouble(iCol));
         }
       } else if (typeof expectedVal == "string") {
         Assert.equal(stmt.VALUE_TYPE_TEXT, valType);
         Assert.equal(expectedVal, stmt.getUTF8String(iCol));
-      } else { // blob
+      } else {
+        // blob
         Assert.equal(stmt.VALUE_TYPE_BLOB, valType);
-        let count = { value: 0 }, blob = { value: null };
+        let count = { value: 0 },
+          blob = { value: null };
         stmt.getBlob(iCol, count, blob);
         Assert.equal(count.value, expectedVal.length);
         for (let i = 0; i < count.value; i++) {
           Assert.equal(expectedVal[i], blob.value[i]);
         }
       }
     }
   } finally {
@@ -256,18 +281,19 @@ function asyncClose(db) {
     });
   });
 }
 
 function openAsyncDatabase(file, options) {
   return new Promise((resolve, reject) => {
     let properties;
     if (options) {
-      properties = Cc["@mozilla.org/hash-property-bag;1"].
-          createInstance(Ci.nsIWritablePropertyBag);
+      properties = Cc["@mozilla.org/hash-property-bag;1"].createInstance(
+        Ci.nsIWritablePropertyBag
+      );
       for (let k in options) {
         properties.setProperty(k, options[k]);
       }
     }
     Services.storage.openAsyncDatabase(file, properties, function(status, db) {
       if (Components.isSuccessCode(status)) {
         resolve(db.QueryInterface(Ci.mozIStorageAsyncConnection));
       } else {
--- a/storage/test/unit/test_bug-393952.js
+++ b/storage/test/unit/test_bug-393952.js
@@ -22,14 +22,14 @@ function test_vacuum() {
   stmt.finalize();
 }
 
 var tests = [test_vacuum];
 
 function run_test() {
   setup();
 
-  for (var i = 0; i < tests.length; i++)
+  for (var i = 0; i < tests.length; i++) {
     tests[i]();
+  }
 
   cleanup();
 }
-
--- a/storage/test/unit/test_bug-429521.js
+++ b/storage/test/unit/test_bug-429521.js
@@ -1,25 +1,28 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 function setup() {
   getOpenedDatabase().createTable("t1", "x TEXT");
 
-  var stmt = createStatement("INSERT INTO t1 (x) VALUES ('/mozilla.org/20070129_1/Europe/Berlin')");
+  var stmt = createStatement(
+    "INSERT INTO t1 (x) VALUES ('/mozilla.org/20070129_1/Europe/Berlin')"
+  );
   stmt.execute();
   stmt.finalize();
 }
 
 function test_bug429521() {
   var stmt = createStatement(
     "SELECT DISTINCT(zone) FROM (" +
-        "SELECT x AS zone FROM t1 WHERE x LIKE '/mozilla.org%'" +
-    ");");
+      "SELECT x AS zone FROM t1 WHERE x LIKE '/mozilla.org%'" +
+      ");"
+  );
 
   print("*** test_bug429521: started");
 
   try {
     while (stmt.executeStep()) {
       print("*** test_bug429521: step() Read wrapper.row.zone");
 
       // BUG: the print commands after the following statement
--- a/storage/test/unit/test_bug-444233.js
+++ b/storage/test/unit/test_bug-444233.js
@@ -1,19 +1,23 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 function setup() {
   // Create the table
-  getOpenedDatabase().createTable("test_bug444233",
-                                  "id INTEGER PRIMARY KEY, value TEXT");
+  getOpenedDatabase().createTable(
+    "test_bug444233",
+    "id INTEGER PRIMARY KEY, value TEXT"
+  );
 
   // Insert dummy data, using wrapper methods
-  var stmt = createStatement("INSERT INTO test_bug444233 (value) VALUES (:value)");
+  var stmt = createStatement(
+    "INSERT INTO test_bug444233 (value) VALUES (:value)"
+  );
   stmt.params.value = "value1";
   stmt.execute();
   stmt.finalize();
 
   stmt = createStatement("INSERT INTO test_bug444233 (value) VALUES (:value)");
   stmt.params.value = "value2";
   stmt.execute();
   stmt.finalize();
@@ -43,9 +47,8 @@ function test_bug444233() {
   stmt.finalize();
 }
 
 function run_test() {
   setup();
   test_bug444233();
   cleanup();
 }
-
--- a/storage/test/unit/test_cache_size.js
+++ b/storage/test/unit/test_cache_size.js
@@ -48,22 +48,26 @@ function new_file(name) {
   file.append(name + ".sqlite");
   Assert.ok(!file.exists());
   return file;
 }
 
 function run_test() {
   const kExpectedCacheSize = -2048; // 2MiB
 
-  let pageSizes = [
-    1024,
-    4096,
-    32768,
-  ];
+  let pageSizes = [1024, 4096, 32768];
 
   for (let i = 0; i < pageSizes.length; i++) {
     let pageSize = pageSizes[i];
-    check_size(getDatabase,
-               new_file("shared" + pageSize), pageSize, kExpectedCacheSize);
-    check_size(Services.storage.openUnsharedDatabase,
-               new_file("unshared" + pageSize), pageSize, kExpectedCacheSize);
+    check_size(
+      getDatabase,
+      new_file("shared" + pageSize),
+      pageSize,
+      kExpectedCacheSize
+    );
+    check_size(
+      Services.storage.openUnsharedDatabase,
+      new_file("unshared" + pageSize),
+      pageSize,
+      kExpectedCacheSize
+    );
   }
 }
--- a/storage/test/unit/test_connection_asyncClose.js
+++ b/storage/test/unit/test_connection_asyncClose.js
@@ -18,17 +18,16 @@
  *   - test_asyncClose_failed_open
  * - (!asyncThread && mDBConn) => Close() invoked, actually closes
  *   - test_asyncClose_on_sync_db
  * - (!asyncThread && !mDBConn) => Close() invoked, no close needed, errors.
  *   This happens if the database has already been closed.
  *   - test_double_asyncClose_throws
  */
 
-
 /**
  * Sanity check that our close indeed happens after asynchronously executed
  * statements scheduled during the same turn of the event loop.  Note that we
  * just care that the statement says it completed without error, we're not
  * worried that the close will happen and then the statement will magically
  * complete.
  */
 add_task(async function test_asyncClose_does_not_complete_before_statements() {
@@ -36,18 +35,20 @@ add_task(async function test_asyncClose_
   let stmt = db.createStatement("SELECT * FROM sqlite_master");
   // Issue the executeAsync but don't yield for it...
   let asyncStatementPromise = executeAsync(stmt);
   stmt.finalize();
 
   // Issue the close.  (And now the order of yielding doesn't matter.)
   // Branch coverage: (asyncThread && mDBConn)
   await asyncClose(db);
-  equal((await asyncStatementPromise),
-        Ci.mozIStorageStatementCallback.REASON_FINISHED);
+  equal(
+    await asyncStatementPromise,
+    Ci.mozIStorageStatementCallback.REASON_FINISHED
+  );
 });
 
 /**
  * Open an async database (ensures the async thread is created) and then invoke
  * AsyncClose() twice without yielding control flow.  The first will initiate
  * the actual async close after calling setClosedState which synchronously
  * impacts what the second call will observe.  The second call will then see the
  * async thread is not available and fall back to invoking Close() which will
--- a/storage/test/unit/test_connection_executeAsync.js
+++ b/storage/test/unit/test_connection_executeAsync.js
@@ -23,17 +23,17 @@ add_task(async function test_first_creat
   // synchronously set up our table *that will be used for the rest of the file*
   db.executeSimpleSQL(
     "CREATE TABLE test (" +
       "id INTEGER, " +
       "string TEXT, " +
       "number REAL, " +
       "nuller NULL, " +
       "blober BLOB" +
-    ")"
+      ")"
   );
 
   let stmts = [];
   stmts[0] = db.createStatement(
     "INSERT INTO test (id, string, number, nuller, blober) VALUES (?, ?, ?, ?, ?)"
   );
   stmts[0].bindByIndex(0, INTEGER);
   stmts[0].bindByIndex(1, TEXT);
@@ -44,49 +44,50 @@ add_task(async function test_first_creat
     "INSERT INTO test (string, number, nuller, blober) VALUES (?, ?, ?, ?)"
   );
   stmts[1].bindByIndex(0, TEXT);
   stmts[1].bindByIndex(1, REAL);
   stmts[1].bindByIndex(2, null);
   stmts[1].bindBlobByIndex(3, BLOB, BLOB.length);
 
   // asynchronously execute the statements
-  let execResult = await executeMultipleStatementsAsync(
-    db,
-    stmts,
-    function(aResultSet) {
-      ok(false, "we only did inserts so we should not have gotten results!");
-    });
-  equal(Ci.mozIStorageStatementCallback.REASON_FINISHED, execResult,
-        "execution should have finished successfully.");
+  let execResult = await executeMultipleStatementsAsync(db, stmts, function(
+    aResultSet
+  ) {
+    ok(false, "we only did inserts so we should not have gotten results!");
+  });
+  equal(
+    Ci.mozIStorageStatementCallback.REASON_FINISHED,
+    execResult,
+    "execution should have finished successfully."
+  );
 
   // Check that the result is in the table
   let stmt = db.createStatement(
     "SELECT string, number, nuller, blober FROM test WHERE id = ?"
   );
   stmt.bindByIndex(0, INTEGER);
   try {
     Assert.ok(stmt.executeStep());
     Assert.equal(TEXT, stmt.getString(0));
     Assert.equal(REAL, stmt.getDouble(1));
     Assert.ok(stmt.getIsNull(2));
     let count = { value: 0 };
     let blob = { value: null };
     stmt.getBlob(3, count, blob);
     Assert.equal(BLOB.length, count.value);
-    for (let i = 0; i < BLOB.length; i++)
+    for (let i = 0; i < BLOB.length; i++) {
       Assert.equal(BLOB[i], blob.value[i]);
+    }
   } finally {
     stmt.finalize();
   }
 
   // Make sure we have two rows in the table
-  stmt = db.createStatement(
-    "SELECT COUNT(1) FROM test"
-  );
+  stmt = db.createStatement("SELECT COUNT(1) FROM test");
   try {
     Assert.ok(stmt.executeStep());
     Assert.equal(2, stmt.getInt32(0));
   } finally {
     stmt.finalize();
   }
 
   stmts[0].finalize();
@@ -96,25 +97,27 @@ add_task(async function test_first_creat
 add_task(async function test_last_multiple_bindings_on_statements() {
   // This tests to make sure that we pass all the statements multiply bound
   // parameters when we call executeAsync.
   const AMOUNT_TO_ADD = 5;
   const ITERATIONS = 5;
 
   let stmts = [];
   let db = getOpenedDatabase();
-  let sqlString = "INSERT INTO test (id, string, number, nuller, blober) " +
-                    "VALUES (:int, :text, :real, :null, :blob)";
+  let sqlString =
+    "INSERT INTO test (id, string, number, nuller, blober) " +
+    "VALUES (:int, :text, :real, :null, :blob)";
   // We run the same statement twice, and should insert 2 * AMOUNT_TO_ADD.
   for (let i = 0; i < ITERATIONS; i++) {
     // alternate the type of statement we create
-    if (i % 2)
+    if (i % 2) {
       stmts[i] = db.createStatement(sqlString);
-    else
+    } else {
       stmts[i] = db.createAsyncStatement(sqlString);
+    }
 
     let params = stmts[i].newBindingParamsArray();
     for (let j = 0; j < AMOUNT_TO_ADD; j++) {
       let bp = params.newBindingParams();
       bp.bindByName("int", INTEGER);
       bp.bindByName("text", TEXT);
       bp.bindByName("real", REAL);
       bp.bindByName("null", null);
@@ -132,30 +135,31 @@ add_task(async function test_last_multip
   try {
     Assert.ok(countStmt.executeStep());
     currentRows = countStmt.row.count;
   } finally {
     countStmt.reset();
   }
 
   // Execute asynchronously.
-  let execResult = await executeMultipleStatementsAsync(
-    db,
-    stmts,
-    function(aResultSet) {
-      ok(false, "we only did inserts so we should not have gotten results!");
-    });
-  equal(Ci.mozIStorageStatementCallback.REASON_FINISHED, execResult,
-        "execution should have finished successfully.");
+  let execResult = await executeMultipleStatementsAsync(db, stmts, function(
+    aResultSet
+  ) {
+    ok(false, "we only did inserts so we should not have gotten results!");
+  });
+  equal(
+    Ci.mozIStorageStatementCallback.REASON_FINISHED,
+    execResult,
+    "execution should have finished successfully."
+  );
 
   // Check to make sure we added all of our rows.
   try {
     Assert.ok(countStmt.executeStep());
-    Assert.equal(currentRows + (ITERATIONS * AMOUNT_TO_ADD),
-                 countStmt.row.count);
+    Assert.equal(currentRows + ITERATIONS * AMOUNT_TO_ADD, countStmt.row.count);
   } finally {
     countStmt.finalize();
   }
 
   stmts.forEach(stmt => stmt.finalize());
 
   // we are the last test using this connection and since it has gone async
   // we *must* call asyncClose on it.
--- a/storage/test/unit/test_connection_executeSimpleSQLAsync.js
+++ b/storage/test/unit/test_connection_executeSimpleSQLAsync.js
@@ -9,71 +9,82 @@
 
 const INTEGER = 1;
 const TEXT = "this is test text";
 const REAL = 3.23;
 
 add_task(async function test_create_and_add() {
   let adb = await openAsyncDatabase(getTestDB());
 
-  let completion = await executeSimpleSQLAsync(adb,
-    "CREATE TABLE test (id INTEGER, string TEXT, number REAL)");
+  let completion = await executeSimpleSQLAsync(
+    adb,
+    "CREATE TABLE test (id INTEGER, string TEXT, number REAL)"
+  );
 
   Assert.equal(Ci.mozIStorageStatementCallback.REASON_FINISHED, completion);
 
-  completion = await executeSimpleSQLAsync(adb,
+  completion = await executeSimpleSQLAsync(
+    adb,
     "INSERT INTO test (id, string, number) " +
-    "VALUES (" + INTEGER + ", \"" + TEXT + "\", " + REAL + ")");
+      "VALUES (" +
+      INTEGER +
+      ', "' +
+      TEXT +
+      '", ' +
+      REAL +
+      ")"
+  );
 
   Assert.equal(Ci.mozIStorageStatementCallback.REASON_FINISHED, completion);
 
   let result = null;
 
-  completion = await executeSimpleSQLAsync(adb,
+  completion = await executeSimpleSQLAsync(
+    adb,
     "SELECT string, number FROM test WHERE id = 1",
     function(aResultSet) {
       result = aResultSet.getNextRow();
       Assert.equal(2, result.numEntries);
       Assert.equal(TEXT, result.getString(0));
       Assert.equal(REAL, result.getDouble(1));
     }
   );
 
   Assert.equal(Ci.mozIStorageStatementCallback.REASON_FINISHED, completion);
   Assert.notEqual(result, null);
   result = null;
 
-  await executeSimpleSQLAsync(adb, "SELECT COUNT(0) FROM test",
-    function(aResultSet) {
-      result = aResultSet.getNextRow();
-      Assert.equal(1, result.getInt32(0));
-    });
+  await executeSimpleSQLAsync(adb, "SELECT COUNT(0) FROM test", function(
+    aResultSet
+  ) {
+    result = aResultSet.getNextRow();
+    Assert.equal(1, result.getInt32(0));
+  });
 
   Assert.notEqual(result, null);
 
   await asyncClose(adb);
 });
 
-
 add_task(async function test_asyncClose_does_not_complete_before_statement() {
   let adb = await openAsyncDatabase(getTestDB());
   let executed = false;
 
-  let reason = await executeSimpleSQLAsync(adb, "SELECT * FROM test",
-    function(aResultSet) {
-      let result = aResultSet.getNextRow();
+  let reason = await executeSimpleSQLAsync(adb, "SELECT * FROM test", function(
+    aResultSet
+  ) {
+    let result = aResultSet.getNextRow();
 
-      Assert.notEqual(result, null);
-      Assert.equal(3, result.numEntries);
-      Assert.equal(INTEGER, result.getInt32(0));
-      Assert.equal(TEXT, result.getString(1));
-      Assert.equal(REAL, result.getDouble(2));
-      executed = true;
-    }
-  );
+    Assert.notEqual(result, null);
+    Assert.equal(3, result.numEntries);
+    Assert.equal(INTEGER, result.getInt32(0));
+    Assert.equal(TEXT, result.getString(1));
+    Assert.equal(REAL, result.getDouble(2));
+    executed = true;
+  });
 
   Assert.equal(Ci.mozIStorageStatementCallback.REASON_FINISHED, reason);
 
   // Ensure that the statement executed to completion.
   Assert.ok(executed);
 
   await asyncClose(adb);
 });
--- a/storage/test/unit/test_connection_failsafe_close.js
+++ b/storage/test/unit/test_connection_failsafe_close.js
@@ -11,19 +11,20 @@
  * See https://bugzilla.mozilla.org/show_bug.cgi?id=1413501 for more context.
  */
 
 add_task(async function test_failsafe_close_of_async_connection() {
   // get the db
   let db = getOpenedDatabase();
 
   // do something async
-  let callbackInvoked = new Promise((resolve) => {
-    db.executeSimpleSQLAsync("CREATE TABLE test (id INTEGER)",
-                             { handleCompletion: resolve });
+  let callbackInvoked = new Promise(resolve => {
+    db.executeSimpleSQLAsync("CREATE TABLE test (id INTEGER)", {
+      handleCompletion: resolve,
+    });
   });
 
   // drop our reference and force a GC so the only live reference is owned by
   // the async statement.
   db = gDBConn = null;
   // (we don't need to cycle collect)
   Cu.forceGC();
 
--- a/storage/test/unit/test_connection_interrupt.js
+++ b/storage/test/unit/test_connection_interrupt.js
@@ -1,76 +1,87 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // This file tests the functionality of mozIStorageAsyncConnection::interrupt.
 
 add_task(async function test_sync_conn() {
   // Interrupt can only be used on async connections.
   let db = getOpenedDatabase();
-  Assert.throws(() => db.interrupt(),
-                /NS_ERROR_ILLEGAL_VALUE/,
-                "interrupt() should throw if invoked on a synchronous connection");
+  Assert.throws(
+    () => db.interrupt(),
+    /NS_ERROR_ILLEGAL_VALUE/,
+    "interrupt() should throw if invoked on a synchronous connection"
+  );
   db.close();
 });
 
 add_task(async function test_wr_async_conn() {
   // Interrupt cannot be used on R/W async connections.
   let db = await openAsyncDatabase(getTestDB());
-  Assert.throws(() => db.interrupt(),
-                /NS_ERROR_ILLEGAL_VALUE/,
-                "interrupt() should throw if invoked on a R/W connection");
+  Assert.throws(
+    () => db.interrupt(),
+    /NS_ERROR_ILLEGAL_VALUE/,
+    "interrupt() should throw if invoked on a R/W connection"
+  );
   await asyncClose(db);
 });
 
 add_task(async function test_closed_conn() {
-  let db = await openAsyncDatabase(getTestDB(), {readOnly: true});
+  let db = await openAsyncDatabase(getTestDB(), { readOnly: true });
   await asyncClose(db);
-  Assert.throws(() => db.interrupt(),
-                /NS_ERROR_NOT_INITIALIZED/,
-                "interrupt() should throw if invoked on a closed connection");
+  Assert.throws(
+    () => db.interrupt(),
+    /NS_ERROR_NOT_INITIALIZED/,
+    "interrupt() should throw if invoked on a closed connection"
+  );
 });
 
-add_task({
-  // We use a timeout in the test that may be insufficient on Android emulators.
-  // We don't really need the Android coverage, so skip on Android.
-  skip_if: () => AppConstants.platform == "android",
-}, async function test_async_conn() {
-  let db = await openAsyncDatabase(getTestDB(), {readOnly: true});
-  // This query is built to hang forever.
-  let stmt = db.createAsyncStatement(`
+add_task(
+  {
+    // We use a timeout in the test that may be insufficient on Android emulators.
+    // We don't really need the Android coverage, so skip on Android.
+    skip_if: () => AppConstants.platform == "android",
+  },
+  async function test_async_conn() {
+    let db = await openAsyncDatabase(getTestDB(), { readOnly: true });
+    // This query is built to hang forever.
+    let stmt = db.createAsyncStatement(`
     WITH RECURSIVE test(n) AS (
       VALUES(1)
       UNION ALL
       SELECT n + 1 FROM test
     )
     SELECT t.n
     FROM test,test AS t`);
 
-  let completePromise = new Promise((resolve, reject) => {
-    let listener = {
-      handleResult(aResultSet) {
-        reject();
-      },
-      handleError(aError) {
-        reject();
-      },
-      handleCompletion(aReason) {
-        resolve(aReason);
-      },
-    };
-    stmt.executeAsync(listener);
-    stmt.finalize();
-  });
+    let completePromise = new Promise((resolve, reject) => {
+      let listener = {
+        handleResult(aResultSet) {
+          reject();
+        },
+        handleError(aError) {
+          reject();
+        },
+        handleCompletion(aReason) {
+          resolve(aReason);
+        },
+      };
+      stmt.executeAsync(listener);
+      stmt.finalize();
+    });
 
-  // Wait for the statement to be executing.
-  // This is not rock-solid, see the discussion in bug 1320301. A better
-  // approach will be evaluated in a separate bug.
-  await new Promise(resolve => do_timeout(500, resolve));
+    // Wait for the statement to be executing.
+    // This is not rock-solid, see the discussion in bug 1320301. A better
+    // approach will be evaluated in a separate bug.
+    await new Promise(resolve => do_timeout(500, resolve));
 
-  db.interrupt();
+    db.interrupt();
 
-  Assert.equal(await completePromise,
-               Ci.mozIStorageStatementCallback.REASON_CANCELED,
-               "Should have been canceled");
+    Assert.equal(
+      await completePromise,
+      Ci.mozIStorageStatementCallback.REASON_CANCELED,
+      "Should have been canceled"
+    );
 
-  await asyncClose(db);
-});
+    await asyncClose(db);
+  }
+);
--- a/storage/test/unit/test_js_helpers.js
+++ b/storage/test/unit/test_js_helpers.js
@@ -7,66 +7,59 @@
 
 /**
  * This file tests that the JS language helpers in various ways.
  */
 
 // Test Functions
 
 function test_params_enumerate() {
-  let stmt = createStatement(
-    "SELECT * FROM test WHERE id IN (:a, :b, :c)"
-  );
+  let stmt = createStatement("SELECT * FROM test WHERE id IN (:a, :b, :c)");
 
   // Make sure they are right.
   let expected = [0, 1, 2, "a", "b", "c", "length"];
   let index = 0;
   for (let name in stmt.params) {
-    if (name == "QueryInterface")
+    if (name == "QueryInterface") {
       continue;
+    }
     Assert.equal(name, expected[index++]);
   }
   Assert.equal(index, 7);
 }
 
 function test_params_prototype() {
-  let stmt = createStatement(
-    "SELECT * FROM sqlite_master"
-  );
+  let stmt = createStatement("SELECT * FROM sqlite_master");
 
   // Set a property on the prototype and make sure it exist (will not be a
   // bindable parameter, however).
   Object.getPrototypeOf(stmt.params).test = 2;
   Assert.equal(stmt.params.test, 2);
 
   delete Object.getPrototypeOf(stmt.params).test;
   stmt.finalize();
 }
 
 function test_row_prototype() {
-  let stmt = createStatement(
-    "SELECT * FROM sqlite_master"
-  );
+  let stmt = createStatement("SELECT * FROM sqlite_master");
 
   Assert.ok(stmt.executeStep());
 
   // Set a property on the prototype and make sure it exists (will not be in the
   // results, however).
   Object.getPrototypeOf(stmt.row).test = 2;
   Assert.equal(stmt.row.test, 2);
 
   // Clean up after ourselves.
   delete Object.getPrototypeOf(stmt.row).test;
   stmt.finalize();
 }
 
 function test_row_enumerate() {
-  let stmt = createStatement(
-    "SELECT * FROM test"
-  );
+  let stmt = createStatement("SELECT * FROM test");
 
   Assert.ok(stmt.executeStep());
 
   let expected = ["id", "string"];
   let expected_values = [123, "foo"];
   let index = 0;
   for (let name in stmt.row) {
     Assert.equal(name, expected[index]);
@@ -77,19 +70,23 @@ function test_row_enumerate() {
 
   // Save off the row helper, then forget the statement and trigger a GC.  We
   // want to ensure that if the row helper is retained but the statement is
   // destroyed, that no crash occurs and that the late access attempt simply
   // throws an error.
   let savedOffRow = stmt.row;
   stmt = null;
   Cu.forceGC();
-  Assert.throws(() => { return savedOffRow.string; },
-                /NS_ERROR_NOT_INITIALIZED/,
-                "GC'ed statement should throw");
+  Assert.throws(
+    () => {
+      return savedOffRow.string;
+    },
+    /NS_ERROR_NOT_INITIALIZED/,
+    "GC'ed statement should throw"
+  );
 }
 
 function test_params_gets_sync() {
   // Added for bug 562866.
   /*
   let stmt = createStatement(
     "SELECT * FROM test WHERE id IN (:a, :b, :c)"
   );
@@ -137,19 +134,17 @@ var tests = [
   test_params_gets_sync,
   test_params_gets_async,
 ];
 function run_test() {
   cleanup();
 
   // Create our database.
   getOpenedDatabase().executeSimpleSQL(
-    "CREATE TABLE test (" +
-      "id INTEGER PRIMARY KEY, string TEXT" +
-    ")"
+    "CREATE TABLE test (" + "id INTEGER PRIMARY KEY, string TEXT" + ")"
   );
   getOpenedDatabase().executeSimpleSQL(
     "INSERT INTO test (id, string) VALUES (123, 'foo')"
   );
 
   // Run the tests.
   tests.forEach(test => test());
 }
--- a/storage/test/unit/test_like.js
+++ b/storage/test/unit/test_like.js
@@ -171,21 +171,29 @@ function test_like_8() {
   Assert.ok(solutions.includes(stmt.getString(0)));
   Assert.ok(stmt.executeStep());
   Assert.ok(solutions.includes(stmt.getString(0)));
   Assert.ok(!stmt.executeStep());
   stmt.reset();
   stmt.finalize();
 }
 
-var tests = [test_count, test_like_1, test_like_2, test_like_3, test_like_4,
-             test_like_5, test_like_6, test_like_7, test_like_8];
+var tests = [
+  test_count,
+  test_like_1,
+  test_like_2,
+  test_like_3,
+  test_like_4,
+  test_like_5,
+  test_like_6,
+  test_like_7,
+  test_like_8,
+];
 
 function run_test() {
   setup();
 
   for (var i = 0; i < tests.length; i++) {
     tests[i]();
   }
 
   cleanup();
 }
-
--- a/storage/test/unit/test_like_escape.js
+++ b/storage/test/unit/test_like_escape.js
@@ -3,17 +3,19 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 const LATIN1_AE = "\xc6";
 const LATIN1_ae = "\xe6";
 
 function setup() {
   getOpenedDatabase().createTable("t1", "x TEXT");
 
-  var stmt = createStatement("INSERT INTO t1 (x) VALUES ('foo/bar_baz%20cheese')");
+  var stmt = createStatement(
+    "INSERT INTO t1 (x) VALUES ('foo/bar_baz%20cheese')"
+  );
   stmt.execute();
   stmt.finalize();
 
   stmt = createStatement("INSERT INTO t1 (x) VALUES (?1)");
   // insert LATIN_ae, but search on LATIN_AE
   stmt.bindByIndex(0, "foo%20" + LATIN1_ae + "/_bar");
   stmt.execute();
   stmt.finalize();
@@ -28,17 +30,20 @@ function test_escape_for_like_ascii() {
   stmt.bindByIndex(0, "%" + paramForLike + "%");
   stmt.executeStep();
   Assert.equal("foo/bar_baz%20cheese", stmt.getString(0));
   stmt.finalize();
 }
 
 function test_escape_for_like_non_ascii() {
   var stmt = createStatement("SELECT x FROM t1 WHERE x LIKE ?1 ESCAPE '/'");
-  var paramForLike = stmt.escapeStringForLIKE("oo%20" + LATIN1_AE + "/_ba", "/");
+  var paramForLike = stmt.escapeStringForLIKE(
+    "oo%20" + LATIN1_AE + "/_ba",
+    "/"
+  );
   // verify that we escaped / _ and %
   Assert.equal(paramForLike, "oo/%20" + LATIN1_AE + "///_ba");
   // prepend and append with % for "contains"
   stmt.bindByIndex(0, "%" + paramForLike + "%");
   stmt.executeStep();
   Assert.equal("foo%20" + LATIN1_ae + "/_bar", stmt.getString(0));
   stmt.finalize();
 }
--- a/storage/test/unit/test_locale_collation.js
+++ b/storage/test/unit/test_locale_collation.js
@@ -68,37 +68,40 @@ function createUtf16Database() {
  * @param aExpected
  *        An array of strings to which aActual should be equivalent.
  */
 function ensureResultsAreCorrect(aActual, aExpected) {
   print("Actual results:   " + aActual);
   print("Expected results: " + aExpected);
 
   Assert.equal(aActual.length, aExpected.length);
-  for (let i = 0; i < aActual.length; i++)
+  for (let i = 0; i < aActual.length; i++) {
     Assert.equal(aActual[i], aExpected[i]);
+  }
 }
 
 /**
  * Synchronously SELECTs all rows from the test table of the given database
  * using the given collation.
  *
  * @param  aCollation
  *         The name of one of our custom locale collations.  The rows are
  *         ordered by this collation.
  * @param  aConn
  *         A connection to either the UTF-8 database or the UTF-16 database.
  * @return The resulting strings in an array.
  */
 function getResults(aCollation, aConn) {
   let results = [];
-  let stmt = aConn.createStatement("SELECT t FROM test " +
-                                   "ORDER BY t COLLATE " + aCollation + " ASC");
-  while (stmt.executeStep())
+  let stmt = aConn.createStatement(
+    "SELECT t FROM test " + "ORDER BY t COLLATE " + aCollation + " ASC"
+  );
+  while (stmt.executeStep()) {
     results.push(stmt.row.t);
+  }
   stmt.finalize();
   return results;
 }
 
 /**
  * Inserts strings into our test table of the given database in the order given.
  *
  * @param aStrings
@@ -160,18 +163,19 @@ function localeCompare(aCollation) {
  *
  * @return The test data as an array of strings.
  */
 function readTestData() {
   print("Reading in test data.");
 
   let file = do_get_file(DATA_BASENAME);
 
-  let istream = Cc["@mozilla.org/network/file-input-stream;1"].
-                createInstance(Ci.nsIFileInputStream);
+  let istream = Cc["@mozilla.org/network/file-input-stream;1"].createInstance(
+    Ci.nsIFileInputStream
+  );
   istream.init(file, -1, -1, 0);
   istream.QueryInterface(Ci.nsILineInputStream);
 
   let line = {};
   let lines = [];
   while (istream.readLine(line)) {
     lines.push(line.value);
   }
@@ -186,18 +190,20 @@ function readTestData() {
  *
  * @param aCollation
  *        The name of one of our custom locale collations.  The rows from the
  *        database and the expected results are ordered by this collation.
  * @param aConn
  *        A connection to either the UTF-8 database or the UTF-16 database.
  */
 function runTest(aCollation, aConn) {
-  ensureResultsAreCorrect(getResults(aCollation, aConn),
-                          gStrings.slice(0).sort(localeCompare(aCollation)));
+  ensureResultsAreCorrect(
+    getResults(aCollation, aConn),
+    gStrings.slice(0).sort(localeCompare(aCollation))
+  );
 }
 
 /**
  * Gets the results from the UTF-8 database using the given collation and
  * ensures that they match gStrings sorted by the same collation.
  *
  * @param aCollation
  *        The name of one of our custom locale collations.  The rows from the
@@ -227,62 +233,63 @@ function setup() {
 
   gStrings = readTestData();
 
   initTableWithStrings(gStrings, getOpenedDatabase());
 
   gUtf16Conn = createUtf16Database();
   initTableWithStrings(gStrings, gUtf16Conn);
 
-  let collFact = Cc["@mozilla.org/intl/collation-factory;1"].
-                 createInstance(Ci.nsICollationFactory);
+  let collFact = Cc["@mozilla.org/intl/collation-factory;1"].createInstance(
+    Ci.nsICollationFactory
+  );
   gLocaleCollation = collFact.CreateCollation();
 }
 
 // Test Runs
 
 var gTests = [
   {
     desc: "Case and accent sensitive UTF-8",
-    run:   () => runUtf8Test("locale_case_accent_sensitive"),
+    run: () => runUtf8Test("locale_case_accent_sensitive"),
   },
 
   {
     desc: "Case sensitive, accent insensitive UTF-8",
-    run:   () => runUtf8Test("locale_case_sensitive"),
+    run: () => runUtf8Test("locale_case_sensitive"),
   },
 
   {
     desc: "Case insensitive, accent sensitive UTF-8",
-    run:   () => runUtf8Test("locale_accent_sensitive"),
+    run: () => runUtf8Test("locale_accent_sensitive"),
   },
 
   {
     desc: "Case and accent insensitive UTF-8",
-    run:   () => runUtf8Test("locale"),
+    run: () => runUtf8Test("locale"),
   },
 
   {
     desc: "Case and accent sensitive UTF-16",
-    run:   () => runUtf16Test("locale_case_accent_sensitive"),
+    run: () => runUtf16Test("locale_case_accent_sensitive"),
   },
 
   {
     desc: "Case sensitive, accent insensitive UTF-16",
-    run:   () => runUtf16Test("locale_case_sensitive"),
+    run: () => runUtf16Test("locale_case_sensitive"),
   },
 
   {
     desc: "Case insensitive, accent sensitive UTF-16",
-    run:   () => runUtf16Test("locale_accent_sensitive"),
+    run: () => runUtf16Test("locale_accent_sensitive"),
   },
 
   {
     desc: "Case and accent insensitive UTF-16",
-    run:   () => runUtf16Test("locale"),
+    run: () => runUtf16Test("locale"),
   },
 ];
 
 function run_test() {
   setup();
   gTests.forEach(function(test) {
     print("-- Running test: " + test.desc);
     test.run();
--- a/storage/test/unit/test_minimizeMemory.js
+++ b/storage/test/unit/test_minimizeMemory.js
@@ -1,17 +1,18 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // This file tests that invoking `Service::minimizeMemory` succeeds for sync
 // and async connections.
 
 function minimizeMemory() {
-  Services.storage.QueryInterface(Ci.nsIObserver)
-                  .observe(null, "memory-pressure", null);
+  Services.storage
+    .QueryInterface(Ci.nsIObserver)
+    .observe(null, "memory-pressure", null);
 }
 
 add_task(async function test_minimizeMemory_async_connection() {
   let db = await openAsyncDatabase(getTestDB());
   minimizeMemory();
   await asyncClose(db);
 });
 
--- a/storage/test/unit/test_retry_on_busy.js
+++ b/storage/test/unit/test_retry_on_busy.js
@@ -1,14 +1,14 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 /* eslint-disable mozilla/no-arbitrary-setTimeout */
 
-const {setTimeout} = ChromeUtils.import("resource://gre/modules/Timer.jsm");
+const { setTimeout } = ChromeUtils.import("resource://gre/modules/Timer.jsm");
 
 function getProfileFile(name) {
   let file = do_get_profile();
   file.append(name);
   return file;
 }
 
 function promiseAsyncDatabase(name, options = null) {
@@ -100,18 +100,20 @@ add_task(async function test_retry_on_bu
     END`);
   await promiseExecuteStatement(createATriggerStmt);
 
   info("Open second writer");
   let db2 = await promiseClone(db1);
 
   info("Attach second writer to new database");
   let attachStmt = db2.createAsyncStatement(`ATTACH :path AS newDB`);
-  attachStmt.bindByName("path",
-    getProfileFile("retry-on-busy-attach.sqlite").path);
+  attachStmt.bindByName(
+    "path",
+    getProfileFile("retry-on-busy-attach.sqlite").path
+  );
   await promiseExecuteStatement(attachStmt);
 
   info("Create triggers on second writer");
   let createCStmt = db2.createAsyncStatement(`CREATE TABLE newDB.c(
     d INTEGER PRIMARY KEY
   )`);
   await promiseExecuteStatement(createCStmt);
   let createCTriggerStmt = db2.createAsyncStatement(`
@@ -121,17 +123,19 @@ add_task(async function test_retry_on_bu
       INSERT INTO a(b) VALUES(OLD.d);
     END`);
   await promiseExecuteStatement(createCTriggerStmt);
 
   info("Begin transaction on second writer");
   let begin2Stmt = db2.createAsyncStatement("BEGIN IMMEDIATE");
   await promiseExecuteStatement(begin2Stmt);
 
-  info("Begin transaction on first writer; should busy-wait until second writer is done");
+  info(
+    "Begin transaction on first writer; should busy-wait until second writer is done"
+  );
   let begin1Stmt = db1.createAsyncStatement("BEGIN IMMEDIATE");
   let promise1Began = promiseExecuteStatement(begin1Stmt);
   let update1Stmt = db1.createAsyncStatement(`UPDATE a SET b = 3 WHERE b = 1`);
   let promise1Updated = promiseExecuteStatement(update1Stmt);
 
   info("Wait 5 seconds");
   await new Promise(resolve => setTimeout(resolve, 5000));
 
@@ -153,20 +157,32 @@ add_task(async function test_retry_on_bu
   await promiseExecuteStatement(commit1Stmt);
 
   info("Verify our writes succeeded");
   let select1Stmt = db2.createAsyncStatement("SELECT b FROM a");
   let rows = await promiseExecuteStatement(select1Stmt);
   deepEqual(rows.map(row => row.getResultByName("b")), [2, 3]);
 
   info("Clean up");
-  for (let stmt of [walStmt, createAStmt, createPrevAStmt, createATriggerStmt,
-                    attachStmt, createCStmt, createCTriggerStmt,
-                    begin2Stmt, begin1Stmt, insertIntoA2Stmt,
-                    insertIntoC2Stmt, deleteFromC2Stmt,
+  for (let stmt of [
+    walStmt,
+    createAStmt,
+    createPrevAStmt,
+    createATriggerStmt,
+    attachStmt,
+    createCStmt,
+    createCTriggerStmt,
+    begin2Stmt,
+    begin1Stmt,
+    insertIntoA2Stmt,
+    insertIntoC2Stmt,
+    deleteFromC2Stmt,
 
-                     commit2Stmt,
-                    update1Stmt, commit1Stmt, select1Stmt]) {
+    commit2Stmt,
+    update1Stmt,
+    commit1Stmt,
+    select1Stmt,
+  ]) {
     stmt.finalize();
   }
   await promiseClose(db1);
   await promiseClose(db2);
 });
--- a/storage/test/unit/test_sqlite_secure_delete.js
+++ b/storage/test/unit/test_sqlite_secure_delete.js
@@ -14,22 +14,24 @@
 /**
  * Reads the contents of a file and returns it as a string.
  *
  * @param aFile
  *        The file to return from.
  * @return the contents of the file in the form of a string.
  */
 function getFileContents(aFile) {
-  let fstream = Cc["@mozilla.org/network/file-input-stream;1"].
-                createInstance(Ci.nsIFileInputStream);
+  let fstream = Cc["@mozilla.org/network/file-input-stream;1"].createInstance(
+    Ci.nsIFileInputStream
+  );
   fstream.init(aFile, -1, 0, 0);
 
-  let bstream = Cc["@mozilla.org/binaryinputstream;1"].
-                createInstance(Ci.nsIBinaryInputStream);
+  let bstream = Cc["@mozilla.org/binaryinputstream;1"].createInstance(
+    Ci.nsIBinaryInputStream
+  );
   bstream.setInputStream(fstream);
   return bstream.readBytes(bstream.available());
 }
 
 // Tests
 
 add_test(function test_delete_removes_data() {
   const TEST_STRING = "SomeRandomStringToFind";
--- a/storage/test/unit/test_statement_executeAsync.js
+++ b/storage/test/unit/test_statement_executeAsync.js
@@ -42,123 +42,156 @@ const BLOB = [1, 2];
  *        number, 2) result tuple, 3) call stack for the original call to
  *        execAsync as arguments.  If it is a list, we currently assume it is a
  *        list of functions where each function is intended to evaluate the
  *        result row at that ordinal position and takes the result tuple and
  *        the call stack for the original call.
  */
 function execAsync(aStmt, aOptions, aResults) {
   let caller = Components.stack.caller;
-  if (aOptions == null)
+  if (aOptions == null) {
     aOptions = {};
+  }
 
   let resultsExpected;
   let resultsChecker;
   if (aResults == null) {
     resultsExpected = 0;
   } else if (typeof aResults == "number") {
     resultsExpected = aResults;
   } else if (typeof aResults == "function") {
     resultsChecker = aResults;
-  } else { // array
+  } else {
+    // array
     resultsExpected = aResults.length;
     resultsChecker = function(aResultNum, aTup, aCaller) {
       aResults[aResultNum](aTup, aCaller);
     };
   }
   let resultsSeen = 0;
 
   let errorCodeExpected = false;
   let reasonExpected = Ci.mozIStorageStatementCallback.REASON_FINISHED;
   let altReasonExpected = null;
   if ("error" in aOptions) {
     errorCodeExpected = aOptions.error;
-    if (errorCodeExpected)
+    if (errorCodeExpected) {
       reasonExpected = Ci.mozIStorageStatementCallback.REASON_ERROR;
+    }
   }
   let errorCodeSeen = false;
 
-  if ("cancel" in aOptions && aOptions.cancel)
+  if ("cancel" in aOptions && aOptions.cancel) {
     altReasonExpected = Ci.mozIStorageStatementCallback.REASON_CANCELED;
+  }
 
   let completed = false;
 
   let listener = {
     handleResult(aResultSet) {
-      let row, resultsSeenThisCall = 0;
+      let row,
+        resultsSeenThisCall = 0;
       while ((row = aResultSet.getNextRow()) != null) {
-        if (resultsChecker)
+        if (resultsChecker) {
           resultsChecker(resultsSeen, row, caller);
+        }
         resultsSeen++;
         resultsSeenThisCall++;
       }
 
-      if (!resultsSeenThisCall)
+      if (!resultsSeenThisCall) {
         do_throw("handleResult invoked with 0 result rows!");
+      }
     },
     handleError(aError) {
-      if (errorCodeSeen)
+      if (errorCodeSeen) {
         do_throw("handleError called when we already had an error!");
+      }
       errorCodeSeen = aError.result;
     },
     handleCompletion(aReason) {
-      if (completed) // paranoia check
+      if (completed) {
+        // paranoia check
         do_throw("Received a second handleCompletion notification!", caller);
+      }
 
-      if (resultsSeen != resultsExpected)
-        do_throw("Expected " + resultsExpected + " rows of results but " +
-                 "got " + resultsSeen + " rows!", caller);
+      if (resultsSeen != resultsExpected) {
+        do_throw(
+          "Expected " +
+            resultsExpected +
+            " rows of results but " +
+            "got " +
+            resultsSeen +
+            " rows!",
+          caller
+        );
+      }
 
-      if (errorCodeExpected && !errorCodeSeen)
+      if (errorCodeExpected && !errorCodeSeen) {
         do_throw("Expected an error, but did not see one.", caller);
-      else if (errorCodeExpected != errorCodeSeen)
-        do_throw("Expected error code " + errorCodeExpected + " but got " +
-                 errorCodeSeen, caller);
+      } else if (errorCodeExpected != errorCodeSeen) {
+        do_throw(
+          "Expected error code " +
+            errorCodeExpected +
+            " but got " +
+            errorCodeSeen,
+          caller
+        );
+      }
 
-      if (aReason != reasonExpected && aReason != altReasonExpected)
-        do_throw("Expected reason " + reasonExpected +
-                 (altReasonExpected ? (" or " + altReasonExpected) : "") +
-                 " but got " + aReason, caller);
+      if (aReason != reasonExpected && aReason != altReasonExpected) {
+        do_throw(
+          "Expected reason " +
+            reasonExpected +
+            (altReasonExpected ? " or " + altReasonExpected : "") +
+            " but got " +
+            aReason,
+          caller
+        );
+      }
 
       completed = true;
     },
   };
 
   let pending;
   // Only get a pending reference if we're supposed to do.
   // (note: This does not stop XPConnect from holding onto one currently.)
-  if (("cancel" in aOptions && aOptions.cancel) ||
-      ("returnPending" in aOptions && aOptions.returnPending)) {
+  if (
+    ("cancel" in aOptions && aOptions.cancel) ||
+    ("returnPending" in aOptions && aOptions.returnPending)
+  ) {
     pending = aStmt.executeAsync(listener);
   } else {
     aStmt.executeAsync(listener);
   }
 
-  if ("cancel" in aOptions && aOptions.cancel)
+  if ("cancel" in aOptions && aOptions.cancel) {
     pending.cancel();
+  }
 
   Services.tm.spinEventLoopUntil(() => completed || _quit);
 
   return pending;
 }
 
 /**
  * Make sure that illegal SQL generates the expected runtime error and does not
  * result in any crashes.  Async-only since the synchronous case generates the
  * error synchronously (and is tested elsewhere).
  */
 function test_illegal_sql_async_deferred() {
   // gibberish
   let stmt = makeTestStatement("I AM A ROBOT. DO AS I SAY.");
-  execAsync(stmt, {error: Ci.mozIStorageError.ERROR});
+  execAsync(stmt, { error: Ci.mozIStorageError.ERROR });
   stmt.finalize();
 
   // legal SQL syntax, but with semantics issues.
   stmt = makeTestStatement("SELECT destination FROM funkytown");
-  execAsync(stmt, {error: Ci.mozIStorageError.ERROR});
+  execAsync(stmt, { error: Ci.mozIStorageError.ERROR });
   stmt.finalize();
 
   run_next_test();
 }
 test_illegal_sql_async_deferred.asyncOnly = true;
 
 function test_create_table() {
   // Ensure our table doesn't exist
@@ -166,17 +199,17 @@ function test_create_table() {
 
   var stmt = makeTestStatement(
     "CREATE TABLE test (" +
       "id INTEGER, " +
       "string TEXT, " +
       "number REAL, " +
       "nuller NULL, " +
       "blober BLOB" +
-    ")"
+      ")"
   );
   execAsync(stmt);
   stmt.finalize();
 
   // Check that the table has been created
   Assert.ok(getOpenedDatabase().tableExists("test"));
 
   // Verify that it's created correctly (this will throw if it wasn't)
@@ -185,94 +218,106 @@ function test_create_table() {
   );
   checkStmt.finalize();
   run_next_test();
 }
 
 function test_add_data() {
   var stmt = makeTestStatement(
     "INSERT INTO test (id, string, number, nuller, blober) " +
-    "VALUES (?, ?, ?, ?, ?)"
+      "VALUES (?, ?, ?, ?, ?)"
   );
   stmt.bindBlobByIndex(4, BLOB, BLOB.length);
   stmt.bindByIndex(3, null);
   stmt.bindByIndex(2, REAL);
   stmt.bindByIndex(1, TEXT);
   stmt.bindByIndex(0, INTEGER);
 
   execAsync(stmt);
   stmt.finalize();
 
   // Check that the result is in the table
-  verifyQuery("SELECT string, number, nuller, blober FROM test WHERE id = ?",
-              INTEGER,
-              [TEXT, REAL, null, BLOB]);
+  verifyQuery(
+    "SELECT string, number, nuller, blober FROM test WHERE id = ?",
+    INTEGER,
+    [TEXT, REAL, null, BLOB]
+  );
   run_next_test();
 }
 
 function test_get_data() {
   var stmt = makeTestStatement(
     "SELECT string, number, nuller, blober, id FROM test WHERE id = ?"
   );
   stmt.bindByIndex(0, INTEGER);
   execAsync(stmt, {}, [
     function(tuple) {
       Assert.notEqual(null, tuple);
 
       // Check that it's what we expect
       Assert.ok(!tuple.getIsNull(0));
       Assert.equal(tuple.getResultByName("string"), tuple.getResultByIndex(0));
       Assert.equal(TEXT, tuple.getResultByName("string"));
-      Assert.equal(Ci.mozIStorageValueArray.VALUE_TYPE_TEXT,
-                   tuple.getTypeOfIndex(0));
+      Assert.equal(
+        Ci.mozIStorageValueArray.VALUE_TYPE_TEXT,
+        tuple.getTypeOfIndex(0)
+      );
 
       Assert.ok(!tuple.getIsNull(1));
       Assert.equal(tuple.getResultByName("number"), tuple.getResultByIndex(1));
       Assert.equal(REAL, tuple.getResultByName("number"));
-      Assert.equal(Ci.mozIStorageValueArray.VALUE_TYPE_FLOAT,
-                   tuple.getTypeOfIndex(1));
+      Assert.equal(
+        Ci.mozIStorageValueArray.VALUE_TYPE_FLOAT,
+        tuple.getTypeOfIndex(1)
+      );
 
       Assert.ok(tuple.getIsNull(2));
       Assert.equal(tuple.getResultByName("nuller"), tuple.getResultByIndex(2));
       Assert.equal(null, tuple.getResultByName("nuller"));
-      Assert.equal(Ci.mozIStorageValueArray.VALUE_TYPE_NULL,
-                   tuple.getTypeOfIndex(2));
+      Assert.equal(
+        Ci.mozIStorageValueArray.VALUE_TYPE_NULL,
+        tuple.getTypeOfIndex(2)
+      );
 
       Assert.ok(!tuple.getIsNull(3));
       var blobByName = tuple.getResultByName("blober");
       Assert.equal(BLOB.length, blobByName.length);
       var blobByIndex = tuple.getResultByIndex(3);
       Assert.equal(BLOB.length, blobByIndex.length);
       for (let i = 0; i < BLOB.length; i++) {
         Assert.equal(BLOB[i], blobByName[i]);
         Assert.equal(BLOB[i], blobByIndex[i]);
       }
       var count = { value: 0 };
       var blob = { value: null };
       tuple.getBlob(3, count, blob);
       Assert.equal(BLOB.length, count.value);
-      for (let i = 0; i < BLOB.length; i++)
+      for (let i = 0; i < BLOB.length; i++) {
         Assert.equal(BLOB[i], blob.value[i]);
-      Assert.equal(Ci.mozIStorageValueArray.VALUE_TYPE_BLOB,
-                   tuple.getTypeOfIndex(3));
+      }
+      Assert.equal(
+        Ci.mozIStorageValueArray.VALUE_TYPE_BLOB,
+        tuple.getTypeOfIndex(3)
+      );
 
       Assert.ok(!tuple.getIsNull(4));
       Assert.equal(tuple.getResultByName("id"), tuple.getResultByIndex(4));
       Assert.equal(INTEGER, tuple.getResultByName("id"));
-      Assert.equal(Ci.mozIStorageValueArray.VALUE_TYPE_INTEGER,
-                   tuple.getTypeOfIndex(4));
-    }]);
+      Assert.equal(
+        Ci.mozIStorageValueArray.VALUE_TYPE_INTEGER,
+        tuple.getTypeOfIndex(4)
+      );
+    },
+  ]);
   stmt.finalize();
   run_next_test();
 }
 
 function test_tuple_out_of_bounds() {
-  var stmt = makeTestStatement(
-    "SELECT string FROM test"
-  );
+  var stmt = makeTestStatement("SELECT string FROM test");
   execAsync(stmt, {}, [
     function(tuple) {
       Assert.notEqual(null, tuple);
 
       // Check all out of bounds - should throw
       var methods = [
         "getTypeOfIndex",
         "getInt32",
@@ -295,61 +340,54 @@ function test_tuple_out_of_bounds() {
       try {
         var blob = { value: null };
         var size = { value: 0 };
         tuple.getBlob(tuple.numEntries, blob, size);
         do_throw("did not throw :(");
       } catch (e) {
         Assert.equal(Cr.NS_ERROR_ILLEGAL_VALUE, e.result);
       }
-    }]);
+    },
+  ]);
   stmt.finalize();
   run_next_test();
 }
 
 function test_no_listener_works_on_success() {
-  var stmt = makeTestStatement(
-    "DELETE FROM test WHERE id = ?"
-  );
+  var stmt = makeTestStatement("DELETE FROM test WHERE id = ?");
   stmt.bindByIndex(0, 0);
   stmt.executeAsync();
   stmt.finalize();
 
   // Run the next test.
   run_next_test();
 }
 
 function test_no_listener_works_on_results() {
-  var stmt = makeTestStatement(
-    "SELECT ?"
-  );
+  var stmt = makeTestStatement("SELECT ?");
   stmt.bindByIndex(0, 1);
   stmt.executeAsync();
   stmt.finalize();
 
   // Run the next test.
   run_next_test();
 }
 
 function test_no_listener_works_on_error() {
   // commit without a transaction will trigger an error
-  var stmt = makeTestStatement(
-    "COMMIT"
-  );
+  var stmt = makeTestStatement("COMMIT");
   stmt.executeAsync();
   stmt.finalize();
 
   // Run the next test.
   run_next_test();
 }
 
 function test_partial_listener_works() {
-  var stmt = makeTestStatement(
-    "DELETE FROM test WHERE id = ?"
-  );
+  var stmt = makeTestStatement("DELETE FROM test WHERE id = ?");
   stmt.bindByIndex(0, 0);
   stmt.executeAsync({
     handleResult(aResultSet) {},
   });
   stmt.executeAsync({
     handleError(aError) {},
   });
   stmt.executeAsync({
@@ -363,80 +401,69 @@ function test_partial_listener_works() {
 
 /**
  * Dubious cancellation test that depends on system loading may or may not
  * succeed in canceling things.  It does at least test if calling cancel blows
  * up.  test_AsyncCancellation in test_true_async.cpp is our test that canceling
  * actually works correctly.
  */
 function test_immediate_cancellation() {
-  var stmt = makeTestStatement(
-    "DELETE FROM test WHERE id = ?"
-  );
+  var stmt = makeTestStatement("DELETE FROM test WHERE id = ?");
   stmt.bindByIndex(0, 0);
-  execAsync(stmt, {cancel: true});
+  execAsync(stmt, { cancel: true });
   stmt.finalize();
   run_next_test();
 }
 
 /**
  * Test that calling cancel twice throws the second time.
  */
 function test_double_cancellation() {
-  var stmt = makeTestStatement(
-    "DELETE FROM test WHERE id = ?"
-  );
+  var stmt = makeTestStatement("DELETE FROM test WHERE id = ?");
   stmt.bindByIndex(0, 0);
-  let pendingStatement = execAsync(stmt, {cancel: true});
+  let pendingStatement = execAsync(stmt, { cancel: true });
   // And cancel again - expect an exception
-  expectError(Cr.NS_ERROR_UNEXPECTED,
-              () => pendingStatement.cancel());
+  expectError(Cr.NS_ERROR_UNEXPECTED, () => pendingStatement.cancel());
 
   stmt.finalize();
   run_next_test();
 }
 
 /**
  * Verify that nothing untoward happens if we try and cancel something after it
  * has fully run to completion.
  */
 function test_cancellation_after_execution() {
-  var stmt = makeTestStatement(
-    "DELETE FROM test WHERE id = ?"
-  );
+  var stmt = makeTestStatement("DELETE FROM test WHERE id = ?");
   stmt.bindByIndex(0, 0);
-  let pendingStatement = execAsync(stmt, {returnPending: true});
+  let pendingStatement = execAsync(stmt, { returnPending: true });
   // (the statement has fully executed at this point)
   // canceling after the statement has run to completion should not throw!
   pendingStatement.cancel();
 
   stmt.finalize();
   run_next_test();
 }
 
 /**
  * Verifies that a single statement can be executed more than once.  Might once
  * have been intended to also ensure that callback notifications were not
  * incorrectly interleaved, but that part was brittle (it's totally fine for
  * handleResult to get called multiple times) and not comprehensive.
  */
 function test_double_execute() {
-  var stmt = makeTestStatement(
-    "SELECT 1"
-  );
+  var stmt = makeTestStatement("SELECT 1");
   execAsync(stmt, null, 1);
   execAsync(stmt, null, 1);
   stmt.finalize();
   run_next_test();
 }
 
 function test_finalized_statement_does_not_crash() {
-  var stmt = makeTestStatement(
-    "SELECT * FROM TEST"
-  );
+  var stmt = makeTestStatement("SELECT * FROM TEST");
   stmt.finalize();
   // we are concerned about a crash here; an error is fine.
   try {
     stmt.executeAsync();
   } catch (ex) {
     // Do nothing.
   }
 
@@ -445,95 +472,105 @@ function test_finalized_statement_does_n
 }
 
 /**
  * Bind by mozIStorageBindingParams on the mozIStorageBaseStatement by index.
  */
 function test_bind_direct_binding_params_by_index() {
   var stmt = makeTestStatement(
     "INSERT INTO test (id, string, number, nuller, blober) " +
-    "VALUES (?, ?, ?, ?, ?)"
+      "VALUES (?, ?, ?, ?, ?)"
   );
   let insertId = nextUniqueId++;
   stmt.bindByIndex(0, insertId);
   stmt.bindByIndex(1, TEXT);
   stmt.bindByIndex(2, REAL);
   stmt.bindByIndex(3, null);
   stmt.bindBlobByIndex(4, BLOB, BLOB.length);
   execAsync(stmt);
   stmt.finalize();
-  verifyQuery("SELECT string, number, nuller, blober FROM test WHERE id = ?",
-              insertId,
-              [TEXT, REAL, null, BLOB]);
+  verifyQuery(
+    "SELECT string, number, nuller, blober FROM test WHERE id = ?",
+    insertId,
+    [TEXT, REAL, null, BLOB]
+  );
   run_next_test();
 }
 
 /**
  * Bind by mozIStorageBindingParams on the mozIStorageBaseStatement by name.
  */
 function test_bind_direct_binding_params_by_name() {
   var stmt = makeTestStatement(
     "INSERT INTO test (id, string, number, nuller, blober) " +
-    "VALUES (:int, :text, :real, :null, :blob)"
+      "VALUES (:int, :text, :real, :null, :blob)"
   );
   let insertId = nextUniqueId++;
   stmt.bindByName("int", insertId);
   stmt.bindByName("text", TEXT);
   stmt.bindByName("real", REAL);
   stmt.bindByName("null", null);
   stmt.bindBlobByName("blob", BLOB);
   execAsync(stmt);
   stmt.finalize();
-  verifyQuery("SELECT string, number, nuller, blober FROM test WHERE id = ?",
-              insertId,
-              [TEXT, REAL, null, BLOB]);
+  verifyQuery(
+    "SELECT string, number, nuller, blober FROM test WHERE id = ?",
+    insertId,
+    [TEXT, REAL, null, BLOB]
+  );
   run_next_test();
 }
 
 function test_bind_js_params_helper_by_index() {
   var stmt = makeTestStatement(
     "INSERT INTO test (id, string, number, nuller, blober) " +
-    "VALUES (?, ?, ?, ?, NULL)"
+      "VALUES (?, ?, ?, ?, NULL)"
   );
   let insertId = nextUniqueId++;
   // we cannot bind blobs this way; no blober
   stmt.params[3] = null;
   stmt.params[2] = REAL;
   stmt.params[1] = TEXT;
   stmt.params[0] = insertId;
   execAsync(stmt);
   stmt.finalize();
-  verifyQuery("SELECT string, number, nuller FROM test WHERE id = ?", insertId,
-              [TEXT, REAL, null]);
+  verifyQuery(
+    "SELECT string, number, nuller FROM test WHERE id = ?",
+    insertId,
+    [TEXT, REAL, null]
+  );
   run_next_test();
 }
 
 function test_bind_js_params_helper_by_name() {
   var stmt = makeTestStatement(
     "INSERT INTO test (id, string, number, nuller, blober) " +
-    "VALUES (:int, :text, :real, :null, NULL)"
+      "VALUES (:int, :text, :real, :null, NULL)"
   );
   let insertId = nextUniqueId++;
   // we cannot bind blobs this way; no blober
   stmt.params.null = null;
   stmt.params.real = REAL;
   stmt.params.text = TEXT;
   stmt.params.int = insertId;
   execAsync(stmt);
   stmt.finalize();
-  verifyQuery("SELECT string, number, nuller FROM test WHERE id = ?", insertId,
-              [TEXT, REAL, null]);
+  verifyQuery(
+    "SELECT string, number, nuller FROM test WHERE id = ?",
+    insertId,
+    [TEXT, REAL, null]
+  );
   run_next_test();
 }
 
 function test_bind_multiple_rows_by_index() {
   const AMOUNT_TO_ADD = 5;
   var stmt = makeTestStatement(
     "INSERT INTO test (id, string, number, nuller, blober) " +
-    "VALUES (?, ?, ?, ?, ?)"
+      "VALUES (?, ?, ?, ?, ?)"
   );
   var array = stmt.newBindingParamsArray();
   for (let i = 0; i < AMOUNT_TO_ADD; i++) {
     let bp = array.newBindingParams();
     bp.bindByIndex(0, INTEGER);
     bp.bindByIndex(1, TEXT);
     bp.bindByIndex(2, REAL);
     bp.bindByIndex(3, null);
@@ -549,17 +586,17 @@ function test_bind_multiple_rows_by_inde
   stmt.finalize();
   run_next_test();
 }
 
 function test_bind_multiple_rows_by_name() {
   const AMOUNT_TO_ADD = 5;
   var stmt = makeTestStatement(
     "INSERT INTO test (id, string, number, nuller, blober) " +
-    "VALUES (:int, :text, :real, :null, :blob)"
+      "VALUES (:int, :text, :real, :null, :blob)"
   );
   var array = stmt.newBindingParamsArray();
   for (let i = 0; i < AMOUNT_TO_ADD; i++) {
     let bp = array.newBindingParams();
     bp.bindByName("int", INTEGER);
     bp.bindByName("text", TEXT);
     bp.bindByName("real", REAL);
     bp.bindByName("null", null);
@@ -576,248 +613,205 @@ function test_bind_multiple_rows_by_name
   run_next_test();
 }
 
 /**
  * Verify that a mozIStorageStatement instance throws immediately when we
  * try and bind to an illegal index.
  */
 function test_bind_out_of_bounds_sync_immediate() {
-  let stmt = makeTestStatement(
-    "INSERT INTO test (id) " +
-    "VALUES (?)"
-  );
+  let stmt = makeTestStatement("INSERT INTO test (id) " + "VALUES (?)");
 
   let array = stmt.newBindingParamsArray();
   let bp = array.newBindingParams();
 
   // Check variant binding.
-  expectError(Cr.NS_ERROR_INVALID_ARG,
-              () => bp.bindByIndex(1, INTEGER));
+  expectError(Cr.NS_ERROR_INVALID_ARG, () => bp.bindByIndex(1, INTEGER));
   // Check blob binding.
-  expectError(Cr.NS_ERROR_INVALID_ARG,
-              () => bp.bindBlobByIndex(1, BLOB, BLOB.length));
+  expectError(Cr.NS_ERROR_INVALID_ARG, () =>
+    bp.bindBlobByIndex(1, BLOB, BLOB.length)
+  );
 
   stmt.finalize();
   run_next_test();
 }
 test_bind_out_of_bounds_sync_immediate.syncOnly = true;
 
 /**
  * Verify that a mozIStorageAsyncStatement reports an error asynchronously when
  * we bind to an illegal index.
  */
 function test_bind_out_of_bounds_async_deferred() {
-  let stmt = makeTestStatement(
-    "INSERT INTO test (id) " +
-    "VALUES (?)"
-  );
+  let stmt = makeTestStatement("INSERT INTO test (id) " + "VALUES (?)");
 
   let array = stmt.newBindingParamsArray();
   let bp = array.newBindingParams();
 
   // There is no difference between variant and blob binding for async purposes.
   bp.bindByIndex(1, INTEGER);
   array.addParams(bp);
   stmt.bindParameters(array);
-  execAsync(stmt, {error: Ci.mozIStorageError.RANGE});
+  execAsync(stmt, { error: Ci.mozIStorageError.RANGE });
 
   stmt.finalize();
   run_next_test();
 }
 test_bind_out_of_bounds_async_deferred.asyncOnly = true;
 
 function test_bind_no_such_name_sync_immediate() {
-  let stmt = makeTestStatement(
-    "INSERT INTO test (id) " +
-    "VALUES (:foo)"
-  );
+  let stmt = makeTestStatement("INSERT INTO test (id) " + "VALUES (:foo)");
 
   let array = stmt.newBindingParamsArray();
   let bp = array.newBindingParams();
 
   // Check variant binding.
-  expectError(Cr.NS_ERROR_INVALID_ARG,
-              () => bp.bindByName("doesnotexist", INTEGER));
+  expectError(Cr.NS_ERROR_INVALID_ARG, () =>
+    bp.bindByName("doesnotexist", INTEGER)
+  );
   // Check blob binding.
-  expectError(Cr.NS_ERROR_INVALID_ARG,
-              () => bp.bindBlobByName("doesnotexist", BLOB));
+  expectError(Cr.NS_ERROR_INVALID_ARG, () =>
+    bp.bindBlobByName("doesnotexist", BLOB)
+  );
 
   stmt.finalize();
   run_next_test();
 }
 test_bind_no_such_name_sync_immediate.syncOnly = true;
 
 function test_bind_no_such_name_async_deferred() {
-  let stmt = makeTestStatement(
-    "INSERT INTO test (id) " +
-    "VALUES (:foo)"
-  );
+  let stmt = makeTestStatement("INSERT INTO test (id) " + "VALUES (:foo)");
 
   let array = stmt.newBindingParamsArray();
   let bp = array.newBindingParams();
 
   bp.bindByName("doesnotexist", INTEGER);
   array.addParams(bp);
   stmt.bindParameters(array);
-  execAsync(stmt, {error: Ci.mozIStorageError.RANGE});
+  execAsync(stmt, { error: Ci.mozIStorageError.RANGE });
 
   stmt.finalize();
   run_next_test();
 }
 test_bind_no_such_name_async_deferred.asyncOnly = true;
 
 function test_bind_bogus_type_by_index() {
   // We try to bind a JS Object here that should fail to bind.
-  let stmt = makeTestStatement(
-    "INSERT INTO test (blober) " +
-    "VALUES (?)"
-  );
+  let stmt = makeTestStatement("INSERT INTO test (blober) " + "VALUES (?)");
 
   let array = stmt.newBindingParamsArray();
   let bp = array.newBindingParams();
   Assert.throws(() => bp.bindByIndex(0, run_test), /NS_ERROR_UNEXPECTED/);
 
   stmt.finalize();
   run_next_test();
 }
 
 function test_bind_bogus_type_by_name() {
   // We try to bind a JS Object here that should fail to bind.
-  let stmt = makeTestStatement(
-    "INSERT INTO test (blober) " +
-    "VALUES (:blob)"
-  );
+  let stmt = makeTestStatement("INSERT INTO test (blober) " + "VALUES (:blob)");
 
   let array = stmt.newBindingParamsArray();
   let bp = array.newBindingParams();
   Assert.throws(() => bp.bindByName("blob", run_test), /NS_ERROR_UNEXPECTED/);
 
   stmt.finalize();
   run_next_test();
 }
 
 function test_bind_params_already_locked() {
-  let stmt = makeTestStatement(
-    "INSERT INTO test (id) " +
-    "VALUES (:int)"
-  );
+  let stmt = makeTestStatement("INSERT INTO test (id) " + "VALUES (:int)");
 
   let array = stmt.newBindingParamsArray();
   let bp = array.newBindingParams();
   bp.bindByName("int", INTEGER);
   array.addParams(bp);
 
   // We should get an error after we call addParams and try to bind again.
-  expectError(Cr.NS_ERROR_UNEXPECTED,
-              () => bp.bindByName("int", INTEGER));
+  expectError(Cr.NS_ERROR_UNEXPECTED, () => bp.bindByName("int", INTEGER));
 
   stmt.finalize();
   run_next_test();
 }
 
 function test_bind_params_array_already_locked() {
-  let stmt = makeTestStatement(
-    "INSERT INTO test (id) " +
-    "VALUES (:int)"
-  );
+  let stmt = makeTestStatement("INSERT INTO test (id) " + "VALUES (:int)");
 
   let array = stmt.newBindingParamsArray();
   let bp1 = array.newBindingParams();
   bp1.bindByName("int", INTEGER);
   array.addParams(bp1);
   let bp2 = array.newBindingParams();
   stmt.bindParameters(array);
   bp2.bindByName("int", INTEGER);
 
   // We should get an error after we have bound the array to the statement.
-  expectError(Cr.NS_ERROR_UNEXPECTED,
-              () => array.addParams(bp2));
+  expectError(Cr.NS_ERROR_UNEXPECTED, () => array.addParams(bp2));
 
   stmt.finalize();
   run_next_test();
 }
 
 function test_no_binding_params_from_locked_array() {
-  let stmt = makeTestStatement(
-    "INSERT INTO test (id) " +
-    "VALUES (:int)"
-  );
+  let stmt = makeTestStatement("INSERT INTO test (id) " + "VALUES (:int)");
 
   let array = stmt.newBindingParamsArray();
   let bp = array.newBindingParams();
   bp.bindByName("int", INTEGER);
   array.addParams(bp);
   stmt.bindParameters(array);
 
   // We should not be able to get a new BindingParams object after we have bound
   // to the statement.
-  expectError(Cr.NS_ERROR_UNEXPECTED,
-              () => array.newBindingParams());
+  expectError(Cr.NS_ERROR_UNEXPECTED, () => array.newBindingParams());
 
   stmt.finalize();
   run_next_test();
 }
 
 function test_not_right_owning_array() {
-  let stmt = makeTestStatement(
-    "INSERT INTO test (id) " +
-    "VALUES (:int)"
-  );
+  let stmt = makeTestStatement("INSERT INTO test (id) " + "VALUES (:int)");
 
   let array1 = stmt.newBindingParamsArray();
   let array2 = stmt.newBindingParamsArray();
   let bp = array1.newBindingParams();
   bp.bindByName("int", INTEGER);
 
   // We should not be able to add bp to array2 since it was created from array1.
-  expectError(Cr.NS_ERROR_UNEXPECTED,
-              () => array2.addParams(bp));
+  expectError(Cr.NS_ERROR_UNEXPECTED, () => array2.addParams(bp));
 
   stmt.finalize();
   run_next_test();
 }
 
 function test_not_right_owning_statement() {
-  let stmt1 = makeTestStatement(
-    "INSERT INTO test (id) " +
-    "VALUES (:int)"
-  );
-  let stmt2 = makeTestStatement(
-    "INSERT INTO test (id) " +
-    "VALUES (:int)"
-  );
+  let stmt1 = makeTestStatement("INSERT INTO test (id) " + "VALUES (:int)");
+  let stmt2 = makeTestStatement("INSERT INTO test (id) " + "VALUES (:int)");
 
   let array1 = stmt1.newBindingParamsArray();
   stmt2.newBindingParamsArray();
   let bp = array1.newBindingParams();
   bp.bindByName("int", INTEGER);
   array1.addParams(bp);
 
   // We should not be able to bind array1 since it was created from stmt1.
-  expectError(Cr.NS_ERROR_UNEXPECTED,
-              () => stmt2.bindParameters(array1));
+  expectError(Cr.NS_ERROR_UNEXPECTED, () => stmt2.bindParameters(array1));
 
   stmt1.finalize();
   stmt2.finalize();
   run_next_test();
 }
 
 function test_bind_empty_array() {
-  let stmt = makeTestStatement(
-    "INSERT INTO test (id) " +
-    "VALUES (:int)"
-  );
+  let stmt = makeTestStatement("INSERT INTO test (id) " + "VALUES (:int)");
 
   let paramsArray = stmt.newBindingParamsArray();
 
   // We should not be able to bind this array to the statement because it is
   // empty.
-  expectError(Cr.NS_ERROR_UNEXPECTED,
-              () => stmt.bindParameters(paramsArray));
+  expectError(Cr.NS_ERROR_UNEXPECTED, () => stmt.bindParameters(paramsArray));
 
   stmt.finalize();
   run_next_test();
 }
 
 function test_multiple_results() {
   let expectedResults = getTableRowCount("test");
   // Sanity check - we should have more than one result, but let's be sure.
@@ -901,19 +895,22 @@ const STARTING_UNIQUE_ID = 2;
 var nextUniqueId = STARTING_UNIQUE_ID;
 
 function run_next_test() {
   function _run_next_test() {
     // use a loop so we can skip tests...
     while (index < tests.length) {
       let test = tests[index++];
       // skip tests not appropriate to the current test pass
-      if ((testPass == TEST_PASS_SYNC && ("asyncOnly" in test)) ||
-          (testPass == TEST_PASS_ASYNC && ("syncOnly" in test)))
+      if (
+        (testPass == TEST_PASS_SYNC && "asyncOnly" in test) ||
+        (testPass == TEST_PASS_ASYNC && "syncOnly" in test)
+      ) {
         continue;
+      }
 
       // Asynchronous tests means that exceptions don't kill the test.
       try {
         print("****** Running the next test: " + test.name);
         test();
         return;
       } catch (e) {
         do_throw(e);
--- a/storage/test/unit/test_statement_wrapper_automatically.js
+++ b/storage/test/unit/test_statement_wrapper_automatically.js
@@ -2,18 +2,20 @@
    vim:set ts=2 sw=2 sts=2 et:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // This file tests the functions of mozIStorageStatementWrapper
 
 function setup() {
-  getOpenedDatabase().createTable("test", "id INTEGER PRIMARY KEY, val NONE," +
-                                          "alt_val NONE");
+  getOpenedDatabase().createTable(
+    "test",
+    "id INTEGER PRIMARY KEY, val NONE," + "alt_val NONE"
+  );
 }
 
 /**
  * A convenience wrapper for do_check_eq.  Calls do_check_eq on aActualVal
  * and aReturnedVal, with one caveat.
  *
  * Date objects are converted before parameter binding to PRTime's (microsecs
  * since epoch).  They are not reconverted when retrieved from the database.
@@ -27,17 +29,19 @@ function setup() {
  * may also be abstracted away here.
  *
  * @param aActualVal
  *        the value inserted into the database
  * @param aReturnedVal
  *        the value retrieved from the database
  */
 function checkVal(aActualVal, aReturnedVal) {
-  if (aActualVal instanceof Date) aActualVal = aActualVal.valueOf() * 1000.0;
+  if (aActualVal instanceof Date) {
+    aActualVal = aActualVal.valueOf() * 1000.0;
+  }
   Assert.equal(aActualVal, aReturnedVal);
 }
 
 /**
  * Removes all rows from our test table.
  */
 function clearTable() {
   var stmt = createStatement("DELETE FROM test");
@@ -93,18 +97,19 @@ function insertAndCheckSingleParam(aVal)
  * checked against aVal.
  *
  * @param aVal
  *        value to insert into our test table and check
  */
 function insertAndCheckMultipleParams(aVal) {
   clearTable();
 
-  var stmt = createStatement("INSERT INTO test (val, alt_val) " +
-                             "VALUES (:val, :val)");
+  var stmt = createStatement(
+    "INSERT INTO test (val, alt_val) " + "VALUES (:val, :val)"
+  );
   stmt.params.val = aVal;
   stmt.execute();
   stmt.finalize();
 
   ensureNumRows(1);
 
   stmt = createStatement("SELECT val, alt_val FROM test WHERE id = 1");
   Assert.ok(stmt.step());
@@ -122,32 +127,35 @@ function insertAndCheckMultipleParams(aV
  *        a value inserted or to be inserted into our test table
  */
 function printValDesc(aVal) {
   try {
     var toSource = aVal.toSource();
   } catch (ex) {
     toSource = "";
   }
-  print("Testing value: toString=" + aVal +
-        (toSource ? " toSource=" + toSource : ""));
+  print(
+    "Testing value: toString=" +
+      aVal +
+      (toSource ? " toSource=" + toSource : "")
+  );
 }
 
 function run_test() {
   setup();
 
   // function JSValStorageStatementBinder in
   // storage/mozStorageStatementParams.cpp tells us that the following types
   // and only the following types are valid as statement parameters:
   var vals = [
-    1337,       // int
-    3.1337,     // double
-    "foo",      // string
-    true,       // boolean
-    null,       // null
+    1337, // int
+    3.1337, // double
+    "foo", // string
+    true, // boolean
+    null, // null
     new Date(), // Date object
   ];
 
   vals.forEach(function(val) {
     printValDesc(val);
     print("Single parameter");
     insertAndCheckSingleParam(val);
     print("Multiple parameters");
--- a/storage/test/unit/test_storage_aggregates.js
+++ b/storage/test/unit/test_storage_aggregates.js
@@ -88,19 +88,24 @@ function test_aggregate_result() {
   }
   var stmt = createStatement("SELECT test_sas_aggr(id) FROM function_tests");
   stmt.executeStep();
   Assert.equal(sas, stmt.getInt32(0));
   testSquareAndSumFunction.reset();
   stmt.finalize();
 }
 
-var tests = [test_aggregate_registration, test_aggregate_no_double_registration,
-             test_aggregate_removal, test_aggregate_no_aliases, test_aggregate_call,
-             test_aggregate_result];
+var tests = [
+  test_aggregate_registration,
+  test_aggregate_no_double_registration,
+  test_aggregate_removal,
+  test_aggregate_no_aliases,
+  test_aggregate_call,
+  test_aggregate_result,
+];
 
 function run_test() {
   setup();
 
   for (var i = 0; i < tests.length; i++) {
     tests[i]();
   }
 
--- a/storage/test/unit/test_storage_connection.js
+++ b/storage/test/unit/test_storage_connection.js
@@ -47,17 +47,19 @@ add_task(async function test_tableExists
 
 add_task(async function test_indexExists_not_created() {
   var msc = getOpenedDatabase();
   Assert.ok(!msc.indexExists("foo"));
 });
 
 add_task(async function test_temp_tableExists_and_indexExists() {
   var msc = getOpenedDatabase();
-  msc.executeSimpleSQL("CREATE TEMP TABLE test_temp(id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT)");
+  msc.executeSimpleSQL(
+    "CREATE TEMP TABLE test_temp(id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT)"
+  );
   Assert.ok(msc.tableExists("test_temp"));
 
   msc.executeSimpleSQL("CREATE INDEX test_temp_ind ON test_temp (name)");
   Assert.ok(msc.indexExists("test_temp_ind"));
 
   msc.executeSimpleSQL("DROP INDEX test_temp_ind");
   msc.executeSimpleSQL("DROP TABLE test_temp");
 });
@@ -72,31 +74,35 @@ add_task(async function test_indexExists
   var msc = getOpenedDatabase();
   msc.executeSimpleSQL("CREATE INDEX name_ind ON test (name)");
   Assert.ok(msc.indexExists("name_ind"));
 });
 
 add_task(async function test_createTable_already_created() {
   var msc = getOpenedDatabase();
   Assert.ok(msc.tableExists("test"));
-  Assert.throws(() => msc.createTable("test", "id INTEGER PRIMARY KEY, name TEXT"),
-                /NS_ERROR_FAILURE/);
+  Assert.throws(
+    () => msc.createTable("test", "id INTEGER PRIMARY KEY, name TEXT"),
+    /NS_ERROR_FAILURE/
+  );
 });
 
 add_task(async function test_attach_createTable_tableExists_indexExists() {
   var msc = getOpenedDatabase();
   var file = do_get_file("storage_attach.sqlite", true);
   var msc2 = getDatabase(file);
   msc.executeSimpleSQL("ATTACH DATABASE '" + file.path + "' AS sample");
 
   Assert.ok(!msc.tableExists("sample.test"));
   msc.createTable("sample.test", "id INTEGER PRIMARY KEY, name TEXT");
   Assert.ok(msc.tableExists("sample.test"));
-  Assert.throws(() => msc.createTable("sample.test", "id INTEGER PRIMARY KEY, name TEXT"),
-                /NS_ERROR_FAILURE/);
+  Assert.throws(
+    () => msc.createTable("sample.test", "id INTEGER PRIMARY KEY, name TEXT"),
+    /NS_ERROR_FAILURE/
+  );
 
   Assert.ok(!msc.indexExists("sample.test_ind"));
   msc.executeSimpleSQL("CREATE INDEX sample.test_ind ON test (name)");
   Assert.ok(msc.indexExists("sample.test_ind"));
 
   msc.executeSimpleSQL("DETACH DATABASE sample");
   msc2.close();
   try {
@@ -176,18 +182,19 @@ add_task(async function test_createTable
   } catch (e) {
     if (temp.exists()) {
       try {
         temp.remove(false);
       } catch (e2) {
         // Do nothing.
       }
     }
-    Assert.ok(e.result == Cr.NS_ERROR_NOT_INITIALIZED ||
-              e.result == Cr.NS_ERROR_FAILURE);
+    Assert.ok(
+      e.result == Cr.NS_ERROR_NOT_INITIALIZED || e.result == Cr.NS_ERROR_FAILURE
+    );
   } finally {
     if (con) {
       con.close();
     }
   }
 });
 
 add_task(async function test_defaultSynchronousAtNormal() {
@@ -221,54 +228,60 @@ add_task(async function test_close_does_
   Assert.ok(!event.ran);
   getOpenedDatabase().close();
   Assert.ok(!event.ran);
 
   // Reset gDBConn so that later tests will get a new connection object.
   gDBConn = null;
 });
 
-add_task(async function test_asyncClose_succeeds_with_finalized_async_statement() {
-  // XXX this test isn't perfect since we can't totally control when events will
-  //     run.  If this paticular function fails randomly, it means we have a
-  //     real bug.
+add_task(
+  async function test_asyncClose_succeeds_with_finalized_async_statement() {
+    // XXX this test isn't perfect since we can't totally control when events will
+    //     run.  If this paticular function fails randomly, it means we have a
+    //     real bug.
 
-  // We want to make sure we create a cached async statement to make sure that
-  // when we finalize our statement, we end up finalizing the async one too so
-  // close will succeed.
-  let stmt = createStatement("SELECT * FROM test");
-  stmt.executeAsync();
-  stmt.finalize();
+    // We want to make sure we create a cached async statement to make sure that
+    // when we finalize our statement, we end up finalizing the async one too so
+    // close will succeed.
+    let stmt = createStatement("SELECT * FROM test");
+    stmt.executeAsync();
+    stmt.finalize();
 
-  await asyncClose(getOpenedDatabase());
-  // Reset gDBConn so that later tests will get a new connection object.
-  gDBConn = null;
-});
+    await asyncClose(getOpenedDatabase());
+    // Reset gDBConn so that later tests will get a new connection object.
+    gDBConn = null;
+  }
+);
 
 // Would assert on debug builds.
 if (!AppConstants.DEBUG) {
   add_task(async function test_close_then_release_statement() {
     // Testing the behavior in presence of a bad client that finalizes
     // statements after the database has been closed (typically by
     // letting the gc finalize the statement).
     let db = getOpenedDatabase();
-    let stmt = createStatement("SELECT * FROM test -- test_close_then_release_statement");
+    let stmt = createStatement(
+      "SELECT * FROM test -- test_close_then_release_statement"
+    );
     db.close();
     stmt.finalize(); // Finalize too late - this should not crash
 
     // Reset gDBConn so that later tests will get a new connection object.
     gDBConn = null;
   });
 
   add_task(async function test_asyncClose_then_release_statement() {
     // Testing the behavior in presence of a bad client that finalizes
     // statements after the database has been async closed (typically by
     // letting the gc finalize the statement).
     let db = getOpenedDatabase();
-    let stmt = createStatement("SELECT * FROM test -- test_asyncClose_then_release_statement");
+    let stmt = createStatement(
+      "SELECT * FROM test -- test_asyncClose_then_release_statement"
+    );
     await asyncClose(db);
     stmt.finalize(); // Finalize too late - this should not crash
 
     // Reset gDBConn so that later tests will get a new connection object.
     gDBConn = null;
   });
 }
 
@@ -331,102 +344,121 @@ async function standardAsyncTest(promise
   info("Request complete");
   stmt.finalize();
   Assert.ok(Components.isSuccessCode(result));
   info("Extracting data");
   stmt = adb.createAsyncStatement("SELECT * FROM test");
   let found = false;
   await executeAsync(stmt, function(results) {
     info("Data has been extracted");
-    for (let row = results.getNextRow(); row != null; row = results.getNextRow()) {
+    for (
+      let row = results.getNextRow();
+      row != null;
+      row = results.getNextRow()
+    ) {
       if (row.getResultByName("name") == name) {
         found = true;
         break;
       }
     }
   });
   Assert.ok(found);
   stmt.finalize();
   await asyncClose(adb);
 
   info("Standard async test " + name + " complete");
 }
 
 add_task(async function test_open_async() {
   await standardAsyncTest(openAsyncDatabase(getTestDB(), null), "default");
   await standardAsyncTest(openAsyncDatabase(getTestDB()), "no optional arg");
-  await standardAsyncTest(openAsyncDatabase(getTestDB(),
-    {shared: false, growthIncrement: 54}), "non-default options");
-  await standardAsyncTest(openAsyncDatabase("memory"),
-    "in-memory database", true);
-  await standardAsyncTest(openAsyncDatabase("memory",
-    {shared: false}),
-    "in-memory database and options", true);
+  await standardAsyncTest(
+    openAsyncDatabase(getTestDB(), { shared: false, growthIncrement: 54 }),
+    "non-default options"
+  );
+  await standardAsyncTest(
+    openAsyncDatabase("memory"),
+    "in-memory database",
+    true
+  );
+  await standardAsyncTest(
+    openAsyncDatabase("memory", { shared: false }),
+    "in-memory database and options",
+    true
+  );
 
   info("Testing async opening with bogus options 0");
   let raised = false;
   let adb = null;
 
   try {
-    adb = await openAsyncDatabase("memory", {shared: false, growthIncrement: 54});
+    adb = await openAsyncDatabase("memory", {
+      shared: false,
+      growthIncrement: 54,
+    });
   } catch (ex) {
     raised = true;
   } finally {
     if (adb) {
       await asyncClose(adb);
     }
   }
   Assert.ok(raised);
 
   info("Testing async opening with bogus options 1");
   raised = false;
   adb = null;
   try {
-    adb = await openAsyncDatabase(getTestDB(), {shared: "forty-two"});
+    adb = await openAsyncDatabase(getTestDB(), { shared: "forty-two" });
   } catch (ex) {
     raised = true;
   } finally {
     if (adb) {
       await asyncClose(adb);
     }
   }
   Assert.ok(raised);
 
   info("Testing async opening with bogus options 2");
   raised = false;
   adb = null;
   try {
-    adb = await openAsyncDatabase(getTestDB(), {growthIncrement: "forty-two"});
+    adb = await openAsyncDatabase(getTestDB(), {
+      growthIncrement: "forty-two",
+    });
   } catch (ex) {
     raised = true;
   } finally {
     if (adb) {
       await asyncClose(adb);
     }
   }
   Assert.ok(raised);
 });
 
-
 add_task(async function test_async_open_with_shared_cache() {
   info("Testing that opening with a shared cache doesn't break stuff");
-  let adb = await openAsyncDatabase(getTestDB(), {shared: true});
+  let adb = await openAsyncDatabase(getTestDB(), { shared: true });
 
   let stmt = adb.createAsyncStatement("INSERT INTO test (name) VALUES (:name)");
   stmt.params.name = "clockworker";
   let result = await executeAsync(stmt);
   info("Request complete");
   stmt.finalize();
   Assert.ok(Components.isSuccessCode(result));
   info("Extracting data");
   stmt = adb.createAsyncStatement("SELECT * FROM test");
   let found = false;
   await executeAsync(stmt, function(results) {
     info("Data has been extracted");
-    for (let row = results.getNextRow(); row != null; row = results.getNextRow()) {
+    for (
+      let row = results.getNextRow();
+      row != null;
+      row = results.getNextRow()
+    ) {
       if (row.getResultByName("name") == "clockworker") {
         found = true;
         break;
       }
     }
   });
   Assert.ok(found);
   stmt.finalize();
@@ -452,36 +484,43 @@ add_task(async function test_clone_no_op
   info("Testing async cloning");
   let adb1 = await openAsyncDatabase(getTestDB(), null);
   Assert.ok(adb1 instanceof Ci.mozIStorageAsyncConnection);
   Assert.ok(adb1 instanceof Ci.mozIStorageConnection);
 
   info("Cloning database");
 
   let adb2 = await asyncClone(adb1);
-  info("Testing that the cloned db is a mozIStorageAsyncConnection " +
-       "and not a mozIStorageConnection");
+  info(
+    "Testing that the cloned db is a mozIStorageAsyncConnection " +
+      "and not a mozIStorageConnection"
+  );
   Assert.ok(adb2 instanceof Ci.mozIStorageAsyncConnection);
   Assert.ok(adb2 instanceof Ci.mozIStorageConnection);
 
   info("Inserting data into source db");
-  let stmt = adb1.
-               createAsyncStatement("INSERT INTO test (name) VALUES (:name)");
+  let stmt = adb1.createAsyncStatement(
+    "INSERT INTO test (name) VALUES (:name)"
+  );
 
   stmt.params.name = "yoric";
   let result = await executeAsync(stmt);
   info("Request complete");
   stmt.finalize();
   Assert.ok(Components.isSuccessCode(result));
   info("Extracting data from clone db");
   stmt = adb2.createAsyncStatement("SELECT * FROM test");
   let found = false;
   await executeAsync(stmt, function(results) {
     info("Data has been extracted");
-    for (let row = results.getNextRow(); row != null; row = results.getNextRow()) {
+    for (
+      let row = results.getNextRow();
+      row != null;
+      row = results.getNextRow()
+    ) {
       if (row.getResultByName("name") == "yoric") {
         found = true;
         break;
       }
     }
   });
   Assert.ok(found);
   stmt.finalize();
@@ -533,58 +572,51 @@ add_task(async function test_clone_share
   Assert.ok(stmt.executeStep());
   stmt.finalize();
 
   db1.close();
   db2.close();
 });
 
 add_task(async function test_close_clone_fails() {
-  let calls = [
-    "openDatabase",
-    "openUnsharedDatabase",
-  ];
+  let calls = ["openDatabase", "openUnsharedDatabase"];
   calls.forEach(function(methodName) {
     let db = Services.storage[methodName](getTestDB());
     db.close();
     expectError(Cr.NS_ERROR_NOT_INITIALIZED, () => db.clone());
   });
 });
 
 add_task(async function test_memory_clone_fails() {
   let db = Services.storage.openSpecialDatabase("memory");
   db.close();
   expectError(Cr.NS_ERROR_NOT_INITIALIZED, () => db.clone());
 });
 
 add_task(async function test_clone_copies_functions() {
   const FUNC_NAME = "test_func";
-  let calls = [
-    "openDatabase",
-    "openUnsharedDatabase",
-  ];
-  let functionMethods = [
-    "createFunction",
-    "createAggregateFunction",
-  ];
+  let calls = ["openDatabase", "openUnsharedDatabase"];
+  let functionMethods = ["createFunction", "createAggregateFunction"];
   calls.forEach(function(methodName) {
     [true, false].forEach(function(readOnly) {
       functionMethods.forEach(function(functionMethod) {
         let db1 = Services.storage[methodName](getTestDB());
         // Create a function for db1.
         db1[functionMethod](FUNC_NAME, 1, {
           onFunctionCall: () => 0,
           onStep: () => 0,
           onFinal: () => 0,
         });
 
         // Clone it, and make sure the function exists still.
         let db2 = db1.clone(readOnly);
         // Note: this would fail if the function did not exist.
-        let stmt = db2.createStatement("SELECT " + FUNC_NAME + "(id) FROM test");
+        let stmt = db2.createStatement(
+          "SELECT " + FUNC_NAME + "(id) FROM test"
+        );
         stmt.finalize();
         db1.close();
         db2.close();
       });
     });
   });
 });
 
@@ -598,36 +630,32 @@ add_task(async function test_clone_copie
       this.called = true;
     },
     onStep() {
       this.called = true;
     },
     onFinal: () => 0,
   };
 
-  let calls = [
-    "openDatabase",
-    "openUnsharedDatabase",
-  ];
-  let functionMethods = [
-    "createFunction",
-    "createAggregateFunction",
-  ];
+  let calls = ["openDatabase", "openUnsharedDatabase"];
+  let functionMethods = ["createFunction", "createAggregateFunction"];
   calls.forEach(function(methodName) {
     [true, false].forEach(function(readOnly) {
       functionMethods.forEach(function(functionMethod) {
         let db1 = Services.storage[methodName](getTestDB());
         // Create a function for db1.
         let func = new test_func();
         db1[functionMethod](FUNC_NAME, 1, func);
         Assert.ok(!func.called);
 
         // Clone it, and make sure the function gets called.
         let db2 = db1.clone(readOnly);
-        let stmt = db2.createStatement("SELECT " + FUNC_NAME + "(id) FROM test");
+        let stmt = db2.createStatement(
+          "SELECT " + FUNC_NAME + "(id) FROM test"
+        );
         stmt.executeStep();
         Assert.ok(func.called);
         stmt.finalize();
         db1.close();
         db2.close();
       });
     });
   });
@@ -718,19 +746,21 @@ add_task(async function test_readonly_cl
 });
 
 add_task(async function test_clone_attach_database() {
   let db1 = Services.storage.openUnsharedDatabase(getTestDB());
 
   let c = 0;
   function attachDB(conn, name) {
     let file = Services.dirsvc.get("ProfD", Ci.nsIFile);
-    file.append("test_storage_" + (++c) + ".sqlite");
+    file.append("test_storage_" + ++c + ".sqlite");
     let db = Services.storage.openUnsharedDatabase(file);
-    conn.executeSimpleSQL(`ATTACH DATABASE '${db.databaseFile.path}' AS ${name}`);
+    conn.executeSimpleSQL(
+      `ATTACH DATABASE '${db.databaseFile.path}' AS ${name}`
+    );
     db.executeSimpleSQL(`CREATE TABLE test_${name}(name TEXT);`);
     db.close();
   }
   attachDB(db1, "attached_1");
   attachDB(db1, "attached_2");
   db1.executeSimpleSQL(`
     CREATE TEMP TRIGGER test_temp_afterinsert_trigger
     AFTER DELETE ON test_attached_1 FOR EACH ROW
@@ -785,17 +815,18 @@ add_task(async function test_async_clone
   info("Set up tables on original connection");
   let createQueries = [
     `CREATE TEMP TABLE test_temp(name TEXT)`,
     `CREATE INDEX test_temp_idx ON test_temp(name)`,
     `CREATE TEMP TRIGGER test_temp_afterdelete_trigger
      AFTER DELETE ON test_temp FOR EACH ROW
      BEGIN
        INSERT INTO test(name) VALUES(OLD.name);
-     END`];
+     END`,
+  ];
   for (let query of createQueries) {
     let stmt = db.createAsyncStatement(query);
     await executeAsync(stmt);
     stmt.finalize();
   }
 
   info("Create read-write clone with temp tables");
   let readWriteClone = await asyncClone(db, false);
@@ -915,39 +946,47 @@ add_task(async function test_sync_clone_
 });
 
 add_task(async function test_defaultTransactionType() {
   info("Open connection");
   let db = Services.storage.openDatabase(getTestDB());
   Assert.ok(db instanceof Ci.mozIStorageAsyncConnection);
 
   info("Verify default transaction type");
-  Assert.equal(db.defaultTransactionType,
-    Ci.mozIStorageConnection.TRANSACTION_DEFERRED);
+  Assert.equal(
+    db.defaultTransactionType,
+    Ci.mozIStorageConnection.TRANSACTION_DEFERRED
+  );
 
   info("Test other transaction types");
-  for (let type of [Ci.mozIStorageConnection.TRANSACTION_IMMEDIATE,
-                    Ci.mozIStorageConnection.TRANSACTION_EXCLUSIVE]) {
+  for (let type of [
+    Ci.mozIStorageConnection.TRANSACTION_IMMEDIATE,
+    Ci.mozIStorageConnection.TRANSACTION_EXCLUSIVE,
+  ]) {
     db.defaultTransactionType = type;
     Assert.equal(db.defaultTransactionType, type);
   }
 
   info("Should reject unknown transaction types");
-  Assert.throws(() => db.defaultTransactionType =
-                        Ci.mozIStorageConnection.TRANSACTION_DEFAULT,
-                /NS_ERROR_ILLEGAL_VALUE/);
+  Assert.throws(
+    () =>
+      (db.defaultTransactionType =
+        Ci.mozIStorageConnection.TRANSACTION_DEFAULT),
+    /NS_ERROR_ILLEGAL_VALUE/
+  );
 
-  db.defaultTransactionType =
-    Ci.mozIStorageConnection.TRANSACTION_IMMEDIATE;
+  db.defaultTransactionType = Ci.mozIStorageConnection.TRANSACTION_IMMEDIATE;
 
   info("Clone should inherit default transaction type");
   let clone = await asyncClone(db, true);
   Assert.ok(clone instanceof Ci.mozIStorageAsyncConnection);
-  Assert.equal(clone.defaultTransactionType,
-    Ci.mozIStorageConnection.TRANSACTION_IMMEDIATE);
+  Assert.equal(
+    clone.defaultTransactionType,
+    Ci.mozIStorageConnection.TRANSACTION_IMMEDIATE
+  );
 
   info("Begin immediate transaction on main connection");
   db.beginTransaction();
 
   info("Queue immediate transaction on clone");
   let stmts = [
     clone.createAsyncStatement(`BEGIN IMMEDIATE TRANSACTION`),
     clone.createAsyncStatement(`DELETE FROM test WHERE name = 'new'`),
@@ -967,17 +1006,18 @@ add_task(async function test_defaultTran
     stmt.finalize();
   }
   await asyncClose(clone);
   await asyncClose(db);
 });
 
 add_task(async function test_getInterface() {
   let db = getOpenedDatabase();
-  let target = db.QueryInterface(Ci.nsIInterfaceRequestor)
-                 .getInterface(Ci.nsIEventTarget);
+  let target = db
+    .QueryInterface(Ci.nsIInterfaceRequestor)
+    .getInterface(Ci.nsIEventTarget);
   // Just check that target is non-null.  Other tests will ensure that it has
   // the correct value.
   Assert.ok(target != null);
 
   await asyncClose(db);
   gDBConn = null;
 });
--- a/storage/test/unit/test_storage_fulltextindex.js
+++ b/storage/test/unit/test_storage_fulltextindex.js
@@ -6,47 +6,57 @@
 
 // Example statements in these tests are taken from the Full Text Index page
 // on the SQLite wiki: http://www.sqlite.org/cvstrac/wiki?p=FullTextIndex
 
 function test_table_creation() {
   var msc = getOpenedUnsharedDatabase();
 
   msc.executeSimpleSQL(
-    "CREATE VIRTUAL TABLE recipe USING fts3(name, ingredients)");
+    "CREATE VIRTUAL TABLE recipe USING fts3(name, ingredients)"
+  );
 
   Assert.ok(msc.tableExists("recipe"));
 }
 
 function test_insertion() {
   var msc = getOpenedUnsharedDatabase();
 
-  msc.executeSimpleSQL("INSERT INTO recipe (name, ingredients) VALUES " +
-                       "('broccoli stew', 'broccoli peppers cheese tomatoes')");
-  msc.executeSimpleSQL("INSERT INTO recipe (name, ingredients) VALUES " +
-                       "('pumpkin stew', 'pumpkin onions garlic celery')");
-  msc.executeSimpleSQL("INSERT INTO recipe (name, ingredients) VALUES " +
-                       "('broccoli pie', 'broccoli cheese onions flour')");
-  msc.executeSimpleSQL("INSERT INTO recipe (name, ingredients) VALUES " +
-                       "('pumpkin pie', 'pumpkin sugar flour butter')");
+  msc.executeSimpleSQL(
+    "INSERT INTO recipe (name, ingredients) VALUES " +
+      "('broccoli stew', 'broccoli peppers cheese tomatoes')"
+  );
+  msc.executeSimpleSQL(
+    "INSERT INTO recipe (name, ingredients) VALUES " +
+      "('pumpkin stew', 'pumpkin onions garlic celery')"
+  );
+  msc.executeSimpleSQL(
+    "INSERT INTO recipe (name, ingredients) VALUES " +
+      "('broccoli pie', 'broccoli cheese onions flour')"
+  );
+  msc.executeSimpleSQL(
+    "INSERT INTO recipe (name, ingredients) VALUES " +
+      "('pumpkin pie', 'pumpkin sugar flour butter')"
+  );
 
   var stmt = msc.createStatement("SELECT COUNT(*) FROM recipe");
   stmt.executeStep();
 
   Assert.equal(stmt.getInt32(0), 4);
 
   stmt.reset();
   stmt.finalize();
 }
 
 function test_selection() {
   var msc = getOpenedUnsharedDatabase();
 
   var stmt = msc.createStatement(
-    "SELECT rowid, name, ingredients FROM recipe WHERE name MATCH 'pie'");
+    "SELECT rowid, name, ingredients FROM recipe WHERE name MATCH 'pie'"
+  );
 
   Assert.ok(stmt.executeStep());
   Assert.equal(stmt.getInt32(0), 3);
   Assert.equal(stmt.getString(1), "broccoli pie");
   Assert.equal(stmt.getString(2), "broccoli cheese onions flour");
 
   Assert.ok(stmt.executeStep());
   Assert.equal(stmt.getInt32(0), 4);
--- a/storage/test/unit/test_storage_function.js
+++ b/storage/test/unit/test_storage_function.js
@@ -67,19 +67,24 @@ function test_function_call() {
 function test_function_result() {
   var stmt = createStatement("SELECT test_square(42) FROM function_tests");
   stmt.executeStep();
   Assert.equal(42 * 42, stmt.getInt32(0));
   testSquareFunction.calls = 0;
   stmt.finalize();
 }
 
-var tests = [test_function_registration, test_function_no_double_registration,
-             test_function_removal, test_function_aliases, test_function_call,
-             test_function_result];
+var tests = [
+  test_function_registration,
+  test_function_no_double_registration,
+  test_function_removal,
+  test_function_aliases,
+  test_function_call,
+  test_function_result,
+];
 
 function run_test() {
   setup();
 
   for (var i = 0; i < tests.length; i++) {
     tests[i]();
   }
 
--- a/storage/test/unit/test_storage_progresshandler.js
+++ b/storage/test/unit/test_storage_progresshandler.js
@@ -4,17 +4,19 @@
 
 // This file tests the custom progress handlers
 
 function setup() {
   var msc = getOpenedDatabase();
   msc.createTable("handler_tests", "id INTEGER PRIMARY KEY, num INTEGER");
   msc.beginTransaction();
 
-  var stmt = createStatement("INSERT INTO handler_tests (id, num) VALUES(?1, ?2)");
+  var stmt = createStatement(
+    "INSERT INTO handler_tests (id, num) VALUES(?1, ?2)"
+  );
   for (let i = 0; i < 100; ++i) {
     stmt.bindByIndex(0, i);
     stmt.bindByIndex(1, Math.floor(Math.random() * 1000));
     stmt.execute();
   }
   stmt.reset();
   msc.commitTransaction();
   stmt.finalize();
@@ -48,31 +50,33 @@ function test_handler_removal() {
   Assert.equal(oldH, null);
 }
 
 function test_handler_call() {
   var msc = getOpenedDatabase();
   msc.setProgressHandler(50, testProgressHandler);
   // Some long-executing request
   var stmt = createStatement(
-    "SELECT SUM(t1.num * t2.num) FROM handler_tests AS t1, handler_tests AS t2");
+    "SELECT SUM(t1.num * t2.num) FROM handler_tests AS t1, handler_tests AS t2"
+  );
   while (stmt.executeStep()) {
     // Do nothing.
   }
   Assert.ok(testProgressHandler.calls > 0);
   stmt.finalize();
 }
 
 function test_handler_abort() {
   var msc = getOpenedDatabase();
   testProgressHandler.abort = true;
   msc.setProgressHandler(50, testProgressHandler);
   // Some long-executing request
   var stmt = createStatement(
-    "SELECT SUM(t1.num * t2.num) FROM handler_tests AS t1, handler_tests AS t2");
+    "SELECT SUM(t1.num * t2.num) FROM handler_tests AS t1, handler_tests AS t2"
+  );
 
   const SQLITE_INTERRUPT = 9;
   try {
     while (stmt.executeStep()) {
       // Do nothing.
     }
     do_throw("We shouldn't get here!");
   } catch (e) {
@@ -84,19 +88,23 @@ function test_handler_abort() {
     do_throw("We shouldn't get here!");
   } catch (e) {
     // finalize should return the error code since we encountered an error
     Assert.equal(Cr.NS_ERROR_ABORT, e.result);
     Assert.equal(SQLITE_INTERRUPT, msc.lastError);
   }
 }
 
-var tests = [test_handler_registration, test_handler_return,
-             test_handler_removal, test_handler_call,
-             test_handler_abort];
+var tests = [
+  test_handler_registration,
+  test_handler_return,
+  test_handler_removal,
+  test_handler_call,
+  test_handler_abort,
+];
 
 function run_test() {
   setup();
 
   for (var i = 0; i < tests.length; i++) {
     tests[i]();
   }
 
--- a/storage/test/unit/test_storage_service.js
+++ b/storage/test/unit/test_storage_service.js
@@ -79,32 +79,39 @@ function test_backup_not_new_filename() 
 
   var backup = Services.storage.backupDatabaseFile(getTestDB(), fname);
   Assert.notEqual(fname, backup.leafName);
 
   backup.remove(false);
 }
 
 function test_backup_new_filename() {
-  var backup = Services.storage.backupDatabaseFile(getTestDB(), BACKUP_FILE_NAME);
+  var backup = Services.storage.backupDatabaseFile(
+    getTestDB(),
+    BACKUP_FILE_NAME
+  );
   Assert.equal(BACKUP_FILE_NAME, backup.leafName);
 
   backup.remove(false);
 }
 
 function test_backup_new_folder() {
   var parentDir = getTestDB().parent;
   parentDir.append("test_storage_temp");
-  if (parentDir.exists())
+  if (parentDir.exists()) {
     parentDir.remove(true);
+  }
   parentDir.create(Ci.nsIFile.DIRECTORY_TYPE, 0o755);
   Assert.ok(parentDir.exists());
 
-  var backup = Services.storage.backupDatabaseFile(getTestDB(), BACKUP_FILE_NAME,
-                                                   parentDir);
+  var backup = Services.storage.backupDatabaseFile(
+    getTestDB(),
+    BACKUP_FILE_NAME,
+    parentDir
+  );
   Assert.equal(BACKUP_FILE_NAME, backup.leafName);
   Assert.ok(parentDir.equals(backup.parent));
 
   parentDir.remove(true);
 }
 
 var tests = [
   test_openSpecialDatabase_invalid_arg,
--- a/storage/test/unit/test_storage_service_unshared.js
+++ b/storage/test/unit/test_storage_service_unshared.js
@@ -15,17 +15,20 @@ function test_openUnsharedDatabase_file_
 function test_openUnsharedDatabase_file_exists() {
   // it should already exist from our last test
   var db = getTestDB();
   Assert.ok(db.exists());
   Services.storage.openUnsharedDatabase(db);
   Assert.ok(db.exists());
 }
 
-var tests = [test_openUnsharedDatabase_file_DNE,
-             test_openUnsharedDatabase_file_exists];
+var tests = [
+  test_openUnsharedDatabase_file_DNE,
+  test_openUnsharedDatabase_file_exists,
+];
 
 function run_test() {
-  for (var i = 0; i < tests.length; i++)
+  for (var i = 0; i < tests.length; i++) {
     tests[i]();
+  }
 
   cleanup();
 }
--- a/storage/test/unit/test_storage_statement.js
+++ b/storage/test/unit/test_storage_statement.js
@@ -25,25 +25,29 @@ function test_parameterCount_one() {
 function test_getParameterName() {
   var stmt = createStatement("SELECT * FROM test WHERE id = :id");
   Assert.equal(":id", stmt.getParameterName(0));
   stmt.reset();
   stmt.finalize();
 }
 
 function test_getParameterIndex_different() {
-  var stmt = createStatement("SELECT * FROM test WHERE id = :id OR name = :name");
+  var stmt = createStatement(
+    "SELECT * FROM test WHERE id = :id OR name = :name"
+  );
   Assert.equal(0, stmt.getParameterIndex("id"));
   Assert.equal(1, stmt.getParameterIndex("name"));
   stmt.reset();
   stmt.finalize();
 }
 
 function test_getParameterIndex_same() {
-  var stmt = createStatement("SELECT * FROM test WHERE id = :test OR name = :test");
+  var stmt = createStatement(
+    "SELECT * FROM test WHERE id = :test OR name = :test"
+  );
   Assert.equal(0, stmt.getParameterIndex("test"));
   stmt.reset();
   stmt.finalize();
 }
 
 function test_columnCount() {
   var stmt = createStatement("SELECT * FROM test WHERE id = ?1 OR name = ?2");
   Assert.equal(2, stmt.columnCount);
@@ -95,31 +99,38 @@ function test_state_ready() {
 function test_state_executing() {
   var stmt = createStatement("INSERT INTO test (name) VALUES ('foo')");
   stmt.execute();
   stmt.execute();
   stmt.finalize();
 
   stmt = createStatement("SELECT name, id FROM test");
   stmt.executeStep();
-  Assert.equal(Ci.mozIStorageStatement.MOZ_STORAGE_STATEMENT_EXECUTING,
-               stmt.state);
+  Assert.equal(
+    Ci.mozIStorageStatement.MOZ_STORAGE_STATEMENT_EXECUTING,
+    stmt.state
+  );
   stmt.executeStep();
-  Assert.equal(Ci.mozIStorageStatement.MOZ_STORAGE_STATEMENT_EXECUTING,
-               stmt.state);
+  Assert.equal(
+    Ci.mozIStorageStatement.MOZ_STORAGE_STATEMENT_EXECUTING,
+    stmt.state
+  );
   stmt.reset();
   Assert.equal(Ci.mozIStorageStatement.MOZ_STORAGE_STATEMENT_READY, stmt.state);
   stmt.finalize();
 }
 
 function test_state_after_finalize() {
   var stmt = createStatement("SELECT name, id FROM test");
   stmt.executeStep();
   stmt.finalize();
-  Assert.equal(Ci.mozIStorageStatement.MOZ_STORAGE_STATEMENT_INVALID, stmt.state);
+  Assert.equal(
+    Ci.mozIStorageStatement.MOZ_STORAGE_STATEMENT_INVALID,
+    stmt.state
+  );
 }
 
 function test_failed_execute() {
   var stmt = createStatement("INSERT INTO test (name) VALUES ('foo')");
   stmt.execute();
   stmt.finalize();
   var id = getOpenedDatabase().lastInsertRowID;
   stmt = createStatement("INSERT INTO test(id, name) VALUES(:id, 'bar')");
@@ -134,34 +145,39 @@ function test_failed_execute() {
   Assert.equal(Ci.mozIStorageStatement.MOZ_STORAGE_STATEMENT_READY, stmt.state);
   // Should succeed without needing to reset the statement manually
   stmt.finalize();
 }
 
 function test_bind_undefined() {
   var stmt = createStatement("INSERT INTO test (name) VALUES ('foo')");
 
-  expectError(Cr.NS_ERROR_ILLEGAL_VALUE,
-              () => stmt.bindParameters(undefined));
+  expectError(Cr.NS_ERROR_ILLEGAL_VALUE, () => stmt.bindParameters(undefined));
 
   stmt.finalize();
 }
 
-var tests = [test_parameterCount_none, test_parameterCount_one,
-             test_getParameterName, test_getParameterIndex_different,
-             test_getParameterIndex_same, test_columnCount,
-             test_getColumnName, test_getColumnIndex_same_case,
-             test_getColumnIndex_different_case, test_state_ready,
-             test_state_executing, test_state_after_finalize,
-             test_failed_execute,
-             test_bind_undefined,
+var tests = [
+  test_parameterCount_none,
+  test_parameterCount_one,
+  test_getParameterName,
+  test_getParameterIndex_different,
+  test_getParameterIndex_same,
+  test_columnCount,
+  test_getColumnName,
+  test_getColumnIndex_same_case,
+  test_getColumnIndex_different_case,
+  test_state_ready,
+  test_state_executing,
+  test_state_after_finalize,
+  test_failed_execute,
+  test_bind_undefined,
 ];
 
 function run_test() {
   setup();
 
   for (var i = 0; i < tests.length; i++) {
     tests[i]();
   }
 
   cleanup();
 }
-
--- a/storage/test/unit/test_storage_value_array.js
+++ b/storage/test/unit/test_storage_value_array.js
@@ -1,20 +1,24 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // This file tests the functions of mozIStorageValueArray
 
 add_task(async function setup() {
-  getOpenedDatabase().createTable("test", "id INTEGER PRIMARY KEY, name TEXT," +
-                                          "number REAL, nuller NULL, blobber BLOB");
+  getOpenedDatabase().createTable(
+    "test",
+    "id INTEGER PRIMARY KEY, name TEXT," +
+      "number REAL, nuller NULL, blobber BLOB"
+  );
 
-  var stmt = createStatement("INSERT INTO test (name, number, blobber) " +
-                             "VALUES (?1, ?2, ?3)");
+  var stmt = createStatement(
+    "INSERT INTO test (name, number, blobber) " + "VALUES (?1, ?2, ?3)"
+  );
   stmt.bindByIndex(0, "foo");
   stmt.bindByIndex(1, 2.34);
   stmt.bindBlobByIndex(2, [], 0);
   stmt.execute();
 
   stmt.bindByIndex(0, "");
   stmt.bindByIndex(1, 1.23);
   stmt.bindBlobByIndex(2, [1, 2], 2);
@@ -48,62 +52,72 @@ add_task(async function test_getIsNull_f
   stmt.finalize();
 });
 
 add_task(async function test_value_type_null() {
   var stmt = createStatement("SELECT nuller FROM test WHERE id = ?1");
   stmt.bindByIndex(0, 1);
   Assert.ok(stmt.executeStep());
 
-  Assert.equal(Ci.mozIStorageValueArray.VALUE_TYPE_NULL,
-               stmt.getTypeOfIndex(0));
+  Assert.equal(
+    Ci.mozIStorageValueArray.VALUE_TYPE_NULL,
+    stmt.getTypeOfIndex(0)
+  );
   stmt.reset();
   stmt.finalize();
 });
 
 add_task(async function test_value_type_integer() {
   var stmt = createStatement("SELECT id FROM test WHERE id = ?1");
   stmt.bindByIndex(0, 1);
   Assert.ok(stmt.executeStep());
 
-  Assert.equal(Ci.mozIStorageValueArray.VALUE_TYPE_INTEGER,
-               stmt.getTypeOfIndex(0));
+  Assert.equal(
+    Ci.mozIStorageValueArray.VALUE_TYPE_INTEGER,
+    stmt.getTypeOfIndex(0)
+  );
   stmt.reset();
   stmt.finalize();
 });
 
 add_task(async function test_value_type_float() {
   var stmt = createStatement("SELECT number FROM test WHERE id = ?1");
   stmt.bindByIndex(0, 1);
   Assert.ok(stmt.executeStep());
 
-  Assert.equal(Ci.mozIStorageValueArray.VALUE_TYPE_FLOAT,
-               stmt.getTypeOfIndex(0));
+  Assert.equal(
+    Ci.mozIStorageValueArray.VALUE_TYPE_FLOAT,
+    stmt.getTypeOfIndex(0)
+  );
   stmt.reset();
   stmt.finalize();
 });
 
 add_task(async function test_value_type_text() {
   var stmt = createStatement("SELECT name FROM test WHERE id = ?1");
   stmt.bindByIndex(0, 1);
   Assert.ok(stmt.executeStep());
 
-  Assert.equal(Ci.mozIStorageValueArray.VALUE_TYPE_TEXT,
-               stmt.getTypeOfIndex(0));
+  Assert.equal(
+    Ci.mozIStorageValueArray.VALUE_TYPE_TEXT,
+    stmt.getTypeOfIndex(0)
+  );
   stmt.reset();
   stmt.finalize();
 });
 
 add_task(async function test_value_type_blob() {
   var stmt = createStatement("SELECT blobber FROM test WHERE id = ?1");
   stmt.bindByIndex(0, 2);
   Assert.ok(stmt.executeStep());
 
-  Assert.equal(Ci.mozIStorageValueArray.VALUE_TYPE_BLOB,
-               stmt.getTypeOfIndex(0));
+  Assert.equal(
+    Ci.mozIStorageValueArray.VALUE_TYPE_BLOB,
+    stmt.getTypeOfIndex(0)
+  );
   stmt.reset();
   stmt.finalize();
 });
 
 add_task(async function test_numEntries_one() {
   var stmt = createStatement("SELECT blobber FROM test WHERE id = ?1");
   stmt.bindByIndex(0, 2);
   Assert.ok(stmt.executeStep());
@@ -173,10 +187,8 @@ add_task(async function test_getBlob() {
   var arr = { value: null };
   stmt.getBlob(0, count, arr);
   Assert.equal(2, count.value);
   Assert.equal(1, arr.value[0]);
   Assert.equal(2, arr.value[1]);
   stmt.reset();
   stmt.finalize();
 });
-
-
--- a/storage/test/unit/test_telemetry_vfs.js
+++ b/storage/test/unit/test_telemetry_vfs.js
@@ -11,16 +11,18 @@ function run_sql(d, sql) {
 }
 
 function new_file(name) {
   var file = Services.dirsvc.get("ProfD", Ci.nsIFile);
   file.append(name);
   return file;
 }
 function run_test() {
-  let read_hgram = Services.telemetry.getHistogramById("MOZ_SQLITE_OTHER_READ_B");
+  let read_hgram = Services.telemetry.getHistogramById(
+    "MOZ_SQLITE_OTHER_READ_B"
+  );
   let old_sum = read_hgram.snapshot().sum;
   const file = new_file("telemetry.sqlite");
   var d = getDatabase(file);
   run_sql(d, "CREATE TABLE bloat(data varchar)");
   run_sql(d, "DROP TABLE bloat");
   Assert.ok(read_hgram.snapshot().sum > old_sum);
 }
--- a/storage/test/unit/test_unicode.js
+++ b/storage/test/unit/test_unicode.js
@@ -24,45 +24,53 @@ add_task(async function setup() {
   stmt.bindByIndex(1, 4);
   stmt.execute();
   stmt.finalize();
 
   registerCleanupFunction(cleanup);
 });
 
 add_task(async function test_upper_ascii() {
-  var stmt = createStatement("SELECT name, id FROM test WHERE name = upper('a')");
+  var stmt = createStatement(
+    "SELECT name, id FROM test WHERE name = upper('a')"
+  );
   Assert.ok(stmt.executeStep());
   Assert.equal("A", stmt.getString(0));
   Assert.equal(2, stmt.getInt32(1));
   stmt.reset();
   stmt.finalize();
 });
 
 add_task(async function test_upper_non_ascii() {
-  var stmt = createStatement("SELECT name, id FROM test WHERE name = upper(?1)");
+  var stmt = createStatement(
+    "SELECT name, id FROM test WHERE name = upper(?1)"
+  );
   stmt.bindByIndex(0, LATIN1_ae);
   Assert.ok(stmt.executeStep());
   Assert.equal(LATIN1_AE, stmt.getString(0));
   Assert.equal(1, stmt.getInt32(1));
   stmt.reset();
   stmt.finalize();
 });
 
 add_task(async function test_lower_ascii() {
-  var stmt = createStatement("SELECT name, id FROM test WHERE name = lower('B')");
+  var stmt = createStatement(
+    "SELECT name, id FROM test WHERE name = lower('B')"
+  );
   Assert.ok(stmt.executeStep());
   Assert.equal("b", stmt.getString(0));
   Assert.equal(3, stmt.getInt32(1));
   stmt.reset();
   stmt.finalize();
 });
 
 add_task(async function test_lower_non_ascii() {
-  var stmt = createStatement("SELECT name, id FROM test WHERE name = lower(?1)");
+  var stmt = createStatement(
+    "SELECT name, id FROM test WHERE name = lower(?1)"
+  );
   stmt.bindByIndex(0, LATIN1_AE);
   Assert.ok(stmt.executeStep());
   Assert.equal(LATIN1_ae, stmt.getString(0));
   Assert.equal(4, stmt.getInt32(1));
   stmt.reset();
   stmt.finalize();
 });
 
--- a/storage/test/unit/test_vacuum.js
+++ b/storage/test/unit/test_vacuum.js
@@ -12,19 +12,19 @@
 function load_test_vacuum_component() {
   const CATEGORY_NAME = "vacuum-participant";
 
   do_load_manifest("vacuumParticipant.manifest");
 
   // This is a lazy check, there could be more participants than just this test
   // we just mind that the test exists though.
   const EXPECTED_ENTRIES = ["vacuumParticipant"];
-  let {catMan} = Services;
+  let { catMan } = Services;
   let found = false;
-  for (let {data: entry} of catMan.enumerateCategory(CATEGORY_NAME)) {
+  for (let { data: entry } of catMan.enumerateCategory(CATEGORY_NAME)) {
     print("Check if the found category entry (" + entry + ") is expected.");
     if (EXPECTED_ENTRIES.includes(entry)) {
       print("Check that only one test entry exists.");
       Assert.ok(!found);
       found = true;
     } else {
       // Temporary unregister other participants for this test.
       catMan.deleteCategoryEntry("vacuum-participant", entry, false);
@@ -71,19 +71,20 @@ function run_test() {
   }
 
   load_test_vacuum_component();
 
   run_next_test();
 }
 
 const TESTS = [
-
   function test_common_vacuum() {
-    print("\n*** Test that a VACUUM correctly happens and all notifications are fired.");
+    print(
+      "\n*** Test that a VACUUM correctly happens and all notifications are fired."
+    );
     // Wait for VACUUM begin.
     let beginVacuumReceived = false;
     Services.obs.addObserver(function onVacuum(aSubject, aTopic, aData) {
       Services.obs.removeObserver(onVacuum, aTopic);
       beginVacuumReceived = true;
     }, "test-begin-vacuum");
 
     // Wait for heavy IO notifications.
@@ -113,18 +114,20 @@ const TESTS = [
       run_next_test();
     }, "test-end-vacuum");
 
     synthesize_idle_daily();
   },
 
   function test_skipped_if_recent_vacuum() {
     print("\n*** Test that a VACUUM is skipped if it was run recently.");
-    Services.prefs.setIntPref("storage.vacuum.last.testVacuum.sqlite",
-                              parseInt(Date.now() / 1000));
+    Services.prefs.setIntPref(
+      "storage.vacuum.last.testVacuum.sqlite",
+      parseInt(Date.now() / 1000)
+    );
 
     // Wait for VACUUM begin.
     let vacuumObserver = {
       gotNotification: false,
       observe: function VO_observe(aSubject, aTopic, aData) {
         this.gotNotification = true;
       },
       QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
@@ -157,17 +160,19 @@ const TESTS = [
     } finally {
       stmt.finalize();
     }
 
     run_next_test();
   },
 
   function test_skipped_optout_vacuum() {
-    print("\n*** Test that a VACUUM is skipped if the participant wants to opt-out.");
+    print(
+      "\n*** Test that a VACUUM is skipped if the participant wants to opt-out."
+    );
     Services.obs.notifyObservers(null, "test-options", "opt-out");
 
     // Wait for VACUUM begin.
     let vacuumObserver = {
       gotNotification: false,
       observe: function VO_observe(aSubject, aTopic, aData) {
         this.gotNotification = true;
       },
@@ -302,13 +307,15 @@ const TESTS = [
 ];
 
 function run_next_test() {
   if (TESTS.length == 0) {
     Services.obs.notifyObservers(null, "test-options", "dispose");
     do_test_finished();
   } else {
     // Set last VACUUM to a date in the past.
-    Services.prefs.setIntPref("storage.vacuum.last.testVacuum.sqlite",
-                              parseInt(Date.now() / 1000 - 31 * 86400));
+    Services.prefs.setIntPref(
+      "storage.vacuum.last.testVacuum.sqlite",
+      parseInt(Date.now() / 1000 - 31 * 86400)
+    );
     executeSoon(TESTS.shift());
   }
 }
--- a/storage/test/unit/vacuumParticipant.js
+++ b/storage/test/unit/vacuumParticipant.js
@@ -1,16 +1,18 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 // This testing component is used in test_vacuum* tests.
 
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 /**
  * Returns a new nsIFile reference for a profile database.
  * @param filename for the database, excluded the .sqlite extension.
  */
 function new_db_file(name) {
   let file = Services.dirsvc.get("ProfD", Ci.nsIFile);
   file.append(name + ".sqlite");
@@ -25,18 +27,17 @@ function getDatabase(aFile) {
   return Services.storage.openDatabase(aFile);
 }
 
 function vacuumParticipant() {
   this._dbConn = getDatabase(new_db_file("testVacuum"));
   Services.obs.addObserver(this, "test-options");
 }
 
-vacuumParticipant.prototype =
-{
+vacuumParticipant.prototype = {
   classDescription: "vacuumParticipant",
   classID: Components.ID("{52aa0b22-b82f-4e38-992a-c3675a3355d2}"),
   contractID: "@unit.test.com/test-vacuum-participant;1",
 
   get expectedDatabasePageSize() {
     return this._dbConn.defaultPageSize;
   },
   get databaseConnection() {