Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run web-platform-tests url tests and compare results with browsers on wpt.fyi #4477

Closed
zcorpan opened this issue Oct 9, 2019 · 1 comment
Closed

Comments

@zcorpan
Copy link

@zcorpan zcorpan commented Oct 9, 2019

I did this

I visited https://wpt.fyi/results/url?label=experimental&label=master&aligned

I expected the following

Expected to see curl test results. Well, not really, but I think it would be interesting to have.

Context: https://twitter.com/zcorpan/status/1181869515195535360

I assume you'd need a custom runner, similar to https://github.com/web-platform-tests/wpt/blob/master/url/resources/a-element.js but using libcurl API.
The format that https://wpt.fyi results receiver expects is documented here https://github.com/web-platform-tests/wpt.fyi/blob/master/api/README.md#results-creation

This could allow finding the interesting differences, find real-world URLs in httparchive or something for those, and make a case to change either curl or browsers to improve both web compat and interop for URLs. Or possibly just spark some renewed interest from browsers to improve interop for URLs.

@bagder
Copy link
Member

@bagder bagder commented Oct 9, 2019

This basically requires a little program that performs these steps:

  1. the JSON input is read
  2. iterate over all URL tests (they're almost 400 different ones)
  3. for each test, the input URL is passed to curl_url_set()
  4. the parsed results from that call is compared to the JSON fields for that test
  5. output match/not match
  6. loop

Done!

@bagder bagder added the tests label Oct 9, 2019
@bagder bagder closed this in d04ee4c Nov 8, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Feb 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants