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

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:

http://intertwingly.net/projects/pegurl/url.html#postmerge

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: 
http://lists.w3.org/Archives/Public/public-whatwg-archive/2014Nov/0129.html

- Sam Ruby

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