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

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

From: Sam Ruby <rubys@intertwingly.net>
Date: Wed, 19 Nov 2014 07:00:19 -0500
Message-ID: <546C8653.4090107@intertwingly.net>
To: Domenic Denicola <d@domenic.me>
Cc: whatWG <whatwg@whatwg.org>
On 11/18/2014 06:37 PM, Domenic Denicola wrote:
> 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.

Thanks!  I've tried to follow the example that the streams spec is 
providing.  Including the naming of directories.

> 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.

Done, sort-of: https://url.spec.whatwg.org/interop/browser-results/

I note that given the small amount of data, the 'agents with 
differences' column is less useful than it could be.  Basically, a 
reddish color should be interpreted to mean that we don't have three out 
of the four browsers agreeing on all values.

>> 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?

Done.  https://github.com/w3c/web-platform-tests/pull/1402

>> 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.

That's first on my todo list post merge:


Basically, I'd rather do that on the whatwg branch rather than the rubys 
branch, but my stuff isn't quite ready to merge.

>> 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.

I answered that separately: 

- Sam Ruby
Received on Wednesday, 19 November 2014 12:00:47 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:32 UTC