<!-- webkit-test-runner [ useEphemeralSession=true ] -->
<script>
  if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
    setTimeout(() => {
      testRunner.notifyDone();
    }, 1000);
  }
  indexedDB.open('db0', 1).onupgradeneeded = ev => {
    ev.target.result.createObjectStore('os0').createIndex('i', 'a');
    ev.target.result.close();
  };
  indexedDB.open('db0', 2).onupgradeneeded = ev => {
    ev.target.transaction.objectStore('os0').index('i').name = 'y';
    throw new Error(`oh noes`);
  };
  indexedDB.open('db0', 3).onupgradeneeded = ev => {
    ev.target.transaction.objectStore('os0').index('i').name = 'x';
  };
</script>
