W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2014

Re: [whatwg] URL interop status and reference implementation demos

From: Domenic Denicola <d@domenic.me>
Date: Tue, 18 Nov 2014 23:37:19 +0000
To: Sam Ruby <rubys@intertwingly.net>, whatWG <whatwg@whatwg.org>
Message-ID: <7d6ecd4f99a948b7a0ff3bed66290020@CY1PR0501MB1369.namprd05.prod.outlook.com>
Really exciting stuff :D. I love specs that have reference implementations and strong test suites and am hopeful that as URL gets fixes and updates that these stay in sync. E.g. normal software development practices of not changing anything without a test, and so on.

From: whatwg [mailto:whatwg-bounces@lists.whatwg.org] On Behalf Of Sam Ruby

> https://url.spec.whatwg.org/interop/urltest-results/

I'd be interested in a view that only contains refimpl, ie, safari, firefox, and chrome, so we could compare the URL Standard with living browsers.

> I'd like to suggest that the following test be added:
> https://github.com/rubys/url/blob/peg.js/reference-implementation/test/moretestdata.txt

> And that the expected results be changed on the following tests:
> https://github.com/rubys/url/blob/peg.js/reference-implementation/test/patchtestdata.txt

> Note: I appear to have direct update access to urltestdata.txt, but I would appreciate a review before I make any updates.

A pull request with a nice diff would be easy to review, I think?

> The setters also have unit tests:
> https://github.com/rubys/url/blob/peg.js/reference-implementation/test/urlsettest.js

So good!

For streams I am running the unit tests against my reference implementation on every commit (via Travis). Might be worth setting up something similar.

> As a final note, the reference implementation has a list of known differences from the published standard:
> intertwingly.net/projects/pegurl/url.html

Hmm, so this isn't really a reference implementation of the published standard then? Indeed looking at the code it seems to not follow the algorithms in the spec at all :(. That's a bit unfortunate if the goal is to test that the spec is accurate.

I guess https://github.com/rubys/url/tree/peg.js/reference-implementation#historical-notes explains that. Hmm. In that case, I'm unclear in what sense this is a reference implementation, instead of an alternate algorithm.

Received on Tuesday, 18 November 2014 23:37:44 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:26 UTC