async function test(media, startTimes, syncTimeOffset, modifyFn,
        isLowLatency = false) {
      const master = [
        '#EXTM3U\n',
        '#EXT-X-STREAM-INF:BANDWIDTH=200,CODECS="avc1.4d401f,vtt",',
        'RESOLUTION=960x540,FRAME-RATE=60,CLOSED-CAPTIONS=NONE\n',
        'video\n',
      ].join('');

      const segments = [];
      for (let i = 0; i < startTimes.length - 1; i++) {
        const startTime = startTimes[i];
        const endTime = startTimes[i + 1];
        const reference = makeReference(
            startTime, endTime, syncTimeOffset + startTime);
        if (modifyFn) {
          modifyFn(reference);
        }
        segments.push(reference);
      }

      const manifest = shaka.test.ManifestGenerator.generate((manifest) => {
        manifest.anyTimeline();
        manifest.addPartialVariant((variant) => {
          variant.addPartialStream(ContentType.VIDEO, (stream) => {
            stream.segmentIndex = new shaka.media.SegmentIndex(segments);
          });
        });
        manifest.sequenceMode = sequenceMode;
        manifest.type = shaka.media.ManifestParser.HLS;
        manifest.isLowLatency = !!isLowLatency;
      });

      fakeNetEngine
          .setResponseText('test:/master', master)
          .setResponseText('test:/video', media)
          .setResponseValue('test:/init.mp4', initSegmentData)
          .setResponseValue('test:/main.mp4', segmentData);

      const actual = await parser.start('test:/master', playerInterface);
      await loadAllStreamsFor(actual);
      expect(actual).toEqual(manifest);
    }
@param {string} media
@param {!Array<number>} startTimes
@param {number} syncTimeOffset
@param {(function(!shaka.media.SegmentReference))=} modifyFn
@param {boolean=} isLowLatency