[whatwg] URL testing

Michael[tm] Smith mike at w3.org
Fri Nov 23 22:11:27 PST 2012

Chris Weber <chris at lookout.net>, 2012-11-23 11:39 -0800:

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

A lot of these tests -- e.g., test "64" and most all of the "host" tests
after that -- seem to be failing not because of the specific cases they're
testing but because of a common failure caused by that fact that the URL
being tested has no pathname -- and so the expected URL should have no
pathname -- but the actual URL has a "/" appended.

I wonder if it might make more sense for the URLs being tested for all
those cases to include a "/" for the pathname. That way they would be
further isolated to just testing what they're actually intended to test,
rather that what they're instead inadvertently testing currently (the
problem of the "/" being appended).

Then, separate test or tests could be added that are isolated to just
testing whether a "/" gets appended to a pathless URL.

> The test cases and harness are available at:
> https://github.com/cweb/url-testing

I've sent a pull request with the changes described above.


Michael[tm] Smith http://people.w3.org/mike

More information about the whatwg mailing list