[XMLHttpRequest-tests] Scripts to extract xhr test suite metadata, annotate spec (#1272)

*Nearly* all tests in the XHR test suite have (potentially outdated) meta data liking them to specific assertations in the spec. (Technically this is a set of space-separated XPath expressions for each link @rel=help element which, combined with the section linked to from the HREF, identifies a given assertation).

Here's some code to actually make use of this data. One Python script to extract the meta data into a single JSON file, and one javascript to iterate over the resulting JSON data and annotate the spec.

To test, load http://www.w3.org/TR/XMLHttpRequest/ and run this from the browser's dev tools' console:

    document.body.appendChild(document.createElement('script')).src='http://hallvord.com/temp/xhr/annotate_spec.js'

You may have to disable mixed content blocking in your browser if the spec loads over https.

View on GitHub: https://github.com/w3c/web-platform-tests/pull/1272

Received on Monday, 6 October 2014 11:36:23 UTC