function buildExpectedManifest(drmInfos, keyIds) {
    if (!keyIds) {
      if (drmInfos.length) {
        // NOTE: ['sample'] is how we get access to the partial object given to
        // jasmine.objectContaining().
        keyIds = Array.from(drmInfos[0]['sample'].keyIds);
      } else {
        keyIds = [];
      }
    }

    const variants = [];
    const numVariants = 2;
    for (let i = 0; i < numVariants; i++) {
      const variant = jasmine.objectContaining({
        video: jasmine.objectContaining({
          keyIds: new Set(keyIds[i] ? [keyIds[i]] : []),
          drmInfos,
        }),
      });
      variants.push(variant);
    }

    return jasmine.objectContaining({
      variants: variants,
      textStreams: [],
    });
  }
Build an expected manifest which checks DRM-related fields.

@param {!Array<!Object>} drmInfos A list of DrmInfo-like objects.
@param {!Array<string>=} keyIds The key IDs to attach to each variant.
  Will default to the keyIds from the first drmInfo object.
@return {Object} A Manifest-like object.