This document provides a rough evaluation of the coverage of the Presentation API test suite against the Presentation API specification [[!PRESENTATION-API]].
This document is only intended to be maintained while the Second Screen Presentation Working Group is busy assembling an implementation report to be able to publish the Presentation API specification as a Proposed Recommendation, circa end of 2016. Information in this document will quickly become obsolete afterwards.
Milestones in this action plan were set in October 2016 and should now be considered obsolete. The actions items remain valid. Those done are flagged accordingly.
common.js
file created)addEventListener
tests for PresentationRequest
event handlersgetAvailability
tests completePresentationReceiver
completeSection | Test(s) | Covered |
---|
To update the rows that compose the coverage table, run the following steps:
toc.js
file in the same folder as the source of this document.// List of section titles to skip // (because they don't contain testable assertions per se) var sectionsToIgnore = [ 'Introduction', 'Use cases and requirements', 'Conformance', 'Terminology', 'Examples', 'Common idioms', 'Security and privacy considerations', 'Acknowledgments', 'CR exit criteria', 'References', 'Change log' ]; // 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.textContent.replace(/[\dA-Z]+(\.\s|(\.\d+)+)/, '').trim(); 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); console.log(JSON.stringify(toc, null, 2));
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.
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 possible 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.