-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scripts to extract xhr test suite metadata, annotate spec #1272
Conversation
…e JSON data that is generated
Critic review: https://critic.hoppipolla.co.uk/r/2772 This is an external review system which you may optionally use for the code review of your pull request. In order to help critic track your changes, please do not make in-place history rewrites (e.g. via |
(I have no idea why Travis "build" fails) |
To be clear: the expected effect of running the script is
|
|
Note whatwg/xhr#119 which proposes closing this PR. |
Notifying @Manishearth, @Ms2ger, @caitp, @emilio, @ibelem, @jdm, @jungkees, @kangxu, @mathiasbynens, and @ronkorving. (Learn how reviewing works.) |
Nearly all tests in the XHR test suite have (potentially outdated) meta data linking 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:
You may have to disable mixed content blocking in your browser if the spec loads over https.