async function verifyError(master, media, error, onCreateSegmentIndex) {
      fakeNetEngine
          .setResponseText('test:/master', master)
          .setResponseText('test:/audio', media)
          .setResponseText('test:/video', media)
          .setResponseValue('test:/main.exe', segmentData)
          .setResponseValue('test:/init.mp4', initSegmentData)
          .setResponseValue('test:/main.mp4', segmentData)
          .setResponseValue('data:text/plain;base64,AAECAwQFBgcICQoLDA0ODw==',
              aesKey);

      if (onCreateSegmentIndex) {
        const actual = await parser.start('test:/master', playerInterface);
        await expectAsync(loadAllStreamsFor(actual))
            .toBeRejectedWith(Util.jasmineError(error));
      } else {
        await expectAsync(parser.start('test:/master', playerInterface))
            .toBeRejectedWith(Util.jasmineError(error));
      }
    }
@param {string} master
@param {string} media
@param {!shaka.util.Error} error
@param {boolean=} onCreateSegmentIndex