alwinb / spec-url

URL library that implements a reference resolution algorithm for WHATWG URLs
MIT License
5 stars 0 forks source link

Fuzzing against the WHATWG spec #7

Open TimothyGu opened 3 years ago

TimothyGu commented 3 years ago

Since the goal of this module is to provide a reimplementation of the WHATWG URL Standard (but using different algorithms), it might be worthwhile to use a fuzzer to help discover cases where they are not in alignment. This might help finding more cases such as #6.

TimothyGu commented 3 years ago

I wasn't able to find a good fuzzer for JavaScript programs (there are plenty for JavaScript engines), but there are quite a few good ones for some other languages:

alwinb commented 3 years ago

Fuzz tests would be great! In general, for the web platform tests, they would be great.

There is, IIRC an implementation of QuickCheck for javascript that could be made to work? I'm not sure if that quite qualifies as a fuzzer, but still.

It may even be possible to brute force...? Or, well, something like that, being a bit more clever about generating input based on the character sets taken from the spec.

It's not a priority for me right now (there are other things) but it would be good.