static async makeConnection(name, version, upgrade) {
    const wait = () => {
      return shaka.test.Util.delay(0.5);
    };

    const tryOpen = () => {
      return shaka.test.IndexedDBUtils.dbOpenNew_(name, version, upgrade);
    };

    // Try to open a new connection 5 times. If it fails to get a new
    // connection after 5 attempts (with delays in between), just give
    // up.
    let lastError;
    for (let i = 0; i < 5; i++) {
      try {
        return await tryOpen();  // eslint-disable-line no-await-in-loop
      } catch (e) {  // eslint-disable-line no-restricted-syntax
        lastError = e;
        await wait();  // eslint-disable-line no-await-in-loop
      }
    }
    throw lastError;
  }
Make a connection to indexeddb. This assumes that it will be a new
database. If a new database can't be connected to after 5 attempts,
the test will fail.

On Edge, it is possible for the database to not be deleted when the
success callback is fired. This means that when we delete the database and
immediately create a new connection, we will connect to the old database.

@param {string} name
@param {number} version
@param {function(IDBDatabase)} upgrade

@return {!Promise<IDBDatabase>}