This document provided a rough evaluation of the coverage of the Media Source test suite against the Candidate Recommendation of the Media Source Extensions specification [[!MEDIA-SOURCE]] and an action plan to complete the test suite.

The HTML Media Extensions Working Group used this document in mid-2016 to assess the readiness of the Media Source Extensions test suite, and organize its work on tests. This effort led to the creation of an implementation report that demonstrated the interoperability of existing implementations of the Media Source Extensions specification.

This document is no longer maintained. The information it contains should be viewed as obsolete. For instance, it has not been updated to reflect latest improvements made to the test suite before publication as Proposed Recommendation.

Useful links

Test coverage

Section Name Test(s) Covered Assignee

How to update the table

How to update the list of sections

To update the rows that compose the coverage table, run the following steps:

  1. Open the Media Source Extensions specification in your favorite browser
  2. Run the following code in a console window to build the internal representation used to render the table above.
  3. Copy the result and paste it in the toc.js file in the same folder as the source of this document.
  4. Refresh this document.
// List of section titles to skip
// (because they don't contain testable assertions per se)
var sectionsToIgnore = [
  'Introduction',
  'Examples',
  'Acknowledgments',
  'Revision History',
  'References',
  'Event Summary',
  'Track Buffers',
  'VideoPlaybackQuality',
  'Conformance'
];


// Custom forEach function for querySelectorAll results
var forEach = function (array, callback, scope) {
  for (var i = 0; i < array.length; i++) {
    callback.call(scope, array[i], i);
  }
};


// Parse the table of contents and extract the sections of interest
var extractTocRecursively = function (tocEntry, section) {
  forEach(tocEntry.querySelectorAll('ol > li'), function (subTocEntry) {
    if (subTocEntry.parentNode.parentNode !== tocEntry) {
      return;
    }

    // Extract link and main title (skipping the section number in the "span")
    var link = subTocEntry.querySelector('a');
    var name = link.firstChild.nextSibling.textContent;
    if (sectionsToIgnore.includes(name)) {
      return;
    }

    var subSection = {
      number: link.firstChild.textContent.trim(),
      name: name,
      url: link.getAttribute('href').substring(1)
    };

    if (!section.children) {
      section.children = [];
    }
    section.children.push(subSection);
    extractTocRecursively(subTocEntry, subSection);
  });
};

var toc = { name: 'Table of Contents' };
extractTocRecursively(document.querySelector('#toc'), toc);


// Complete the extracted structure with attributes, methods, constructors
// definitions.
var addObjectPropertiesRecursively = function (section) {
  if (section.children) {
    section.children.forEach(addObjectPropertiesRecursively);
    return;
  }
  forEach(document.querySelectorAll(
    '#' + section.url + ' dl:not(.switch) > dt > dfn'),
    function (dfn) {
      var type = dfn.parentNode.parentNode.getAttribute('class') || 's';
      var subSection = {
        name: dfn.innerText,
        url: dfn.getAttribute('id'),
        type: type.substring(0, type.length - 1)
      }
      if (!section.children) {
        section.children = [];
      }
      section.children.push(subSection);
    }
  );
};
addObjectPropertiesRecursively(toc);


console.log(JSON.stringify(toc, null, 2));
        

How to update the list of tests

To update the list of tests and have them link to the section(s) of the specification that they check, edit the tests.js file that sits along the source of this document. Nothing magic there, that's all the result of a bit of elbow grease. A given test may check more than one section in the specification.

How to update the coverage info

To update the information displayed in the last column, edit the coverage.js file that sits along the source of this document. The keys of the coverage object are the ID of the sections, and the values are rough estimate of the test coverage in percent, or an object with a coverage key that sets the coverage percentage, a comments key that lists possibles comments about the coverage (in an array of strings), and an assignee key that sets the person responsible for updating the test suite to cover the section.

If a section does not appear in the coverage object, a question mark will appear in the last column to indicate that coverage is unknown at this stage.