function checkTimePoints(points, expected, timescale,
        presentationTimeOffset, periodDuration) {
      // Construct a SegmentTimeline Node object.
      const xmlLines = ['<?xml version="1.0"?>', '<SegmentTimeline>'];
      for (const p of points) {
        xmlLines.push('<S' +
                      (p.t != null ? ' t="' + p.t + '"' : '') +
                      (p.d != null ? ' d="' + p.d + '"' : '') +
                      (p.r != null ? ' r="' + p.r + '"' : '') +
                      ' />');
      }
      xmlLines.push('</SegmentTimeline>');
      const segmentTimeline = /** @type {shaka.extern.xml.Node} */ (
        shaka.util.TXml.parseXmlString(xmlLines.join('\n'),
            'SegmentTimeline'));

      const timePoints = shaka.util.TXml.findChildren(segmentTimeline, 'S');

      const timeline = MpdUtils.createTimeline(
          timePoints, timescale, presentationTimeOffset, periodDuration, 0);
      expect(timeline).toEqual(
          expected.map((c) => jasmine.objectContaining(c)));
    }
Checks that the createTimeline works with the given timePoints and the
given expected results.

@param {!Array<{t: ?number, d: ?number, r: ?number}>} points
@param {!Array<{start: number, end: number}>} expected
@param {number} timescale
@param {number} presentationTimeOffset
@param {number} periodDuration