[whatwg] URL testing

Anne van Kesteren annevk at annevk.nl
Wed Aug 14 10:11:13 PDT 2013

On Fri, Nov 23, 2012 at 7:39 PM, Chris Weber <chris at lookout.net> wrote:
> Hello, I've been trying to follow Anne's work with the URL spec, and
> working on using the W3C testharness.js for URL testing.  I have some
> URL testing running, with still more work to do:
> http://www.lookout.net/test/url/
> The test cases and harness are available at:
> https://github.com/cweb/url-testing
> I've aggregated about 600 test cases and their expected results from
> several sources, and converted them into JSON format (urls.json).  A
> majority come from Webkit's fast/url suite as referenced in the
> urls.json file.  A few test cases had to be modified to suit JSON, but
> not many.

I've done something similar now, but with tests that match the
requirements of the URL Standard (and pass in my jURL/url.js library).

https://github.com/annevk/url/ has all the relevant data.

I decided to create a new custom format to host all the tests, similar
to html5lib, as JSON has no support for lone surrogates or comments.
It should be pretty trivial to contribute new tests for this format
and I have scripts that can generate the format given some test data.

Not tested: IDNA, setting URL properties (needs custom solution),
origin property.

Feedback welcome.


More information about the whatwg mailing list