|
| 1 | +# RFC 181 - URLManifestItem.url shouldn't contain non-URL-unit characters |
| 2 | + |
| 3 | +## Summary |
| 4 | + |
| 5 | +Currently we end up storing URLs such as: `/xhr/xmlhttprequest-timeout-worker-aborted.html?aborted immediately after send()`. If you pass this to the [URL parser](https://url.spec.whatwg.org/#concept-url-parser) with a base URL of `http://web-platform.test`, this results in a number of [invalid-URL-unit](https://url.spec.whatwg.org/#invalid-url-unit) [validation errors](https://url.spec.whatwg.org/#validation-error). |
| 6 | + |
| 7 | +We should instead store the output of [URL serialize](https://url.spec.whatwg.org/#concept-url-serializer) ∘ [URL parse](https://url.spec.whatwg.org/#concept-url-parser) of the URL. |
| 8 | + |
| 9 | +## Details |
| 10 | + |
| 11 | +There are various systems at various vendors which expect test identifiers to not contain spaces, and when in principle the test identifier is a URL one might expect it to not contain any spaces. |
| 12 | + |
| 13 | +This is primarily a concern with variants, which vastly more often include spaces, such as the example above. |
| 14 | + |
| 15 | +We do have a few files in WPT which contain spaces: |
| 16 | + |
| 17 | +``` |
| 18 | +gsnedders@gsnedders-marsha web-platform-tests % find . -name '* *' |
| 19 | +./tools/wave/test/WAVE Local.postman_environment.json |
| 20 | +./tools/wave/test/WAVE Server REST API Tests.postman_collection.json |
| 21 | +./tools/wave/tests/WAVE Local.postman_environment.json |
| 22 | +./tools/wave/tests/WAVE Server REST API Tests.postman_collection.json |
| 23 | +./css/CSS2/syntax/support/'green block.png |
| 24 | +./html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/support/url foo |
| 25 | +./html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.worker.js |
| 26 | +./html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.html |
| 27 | +./html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.html |
| 28 | +``` |
| 29 | + |
| 30 | +Only the last three of these are test files, which generate three test items. |
| 31 | + |
| 32 | +One question here is whether we should disallow test file paths that allow spaces, or whether we should just escape these in the URL. |
| 33 | + |
| 34 | +## Risks |
| 35 | + |
| 36 | +Any test system that keys off the test URLs will have to deal with URLs changing. |
| 37 | + |
| 38 | +This includes the wptmanifest (i.e., wptrunner's expectation manifest), WebKit (and I believe Blink)'s TestExpectations files and results expectations files. |
| 39 | + |
| 40 | +This may also affect items in wpt-metadata. |
0 commit comments