static async dump(name) {
    // Open the database, which should exist already.
    const db = await this.openDatabase_(name);

    try {
      const savedDatabase = {
        version: db.version,
        stores: {},
      };

      // For each store, dump the store parameters and data.
      const dumpOperations = [];
      for (const storeName of db.objectStoreNames) {
        dumpOperations.push(this.dumpStore_(db, storeName, savedDatabase));
      }
      await Promise.all(dumpOperations);

      return savedDatabase;
    } finally {
      // Make sure the DB gets closed no matter what.
      db.close();
    }
  }
@param {string} name The name of the database to dump.
@return {!Promise<shaka.test.CannedIDB.SavedDatabase>} An object that can
  be used to recreate the database later in a call to restore().