Add WPT URL test cases for non-special schemes
Add WPT URL test cases for non-special schemes which Chrome incorrectly
parses even when Chrome supports non-special scheme URLs.
The context is "Intent to Ship: Support non-special scheme URLs" thread
[^1].
The CL add test cases for the following schemes:
Opt-out schemes [^2] (Chrome parses these scheme URLs incorrectly as
opaque URLs):
- android://
- drivefs://
- chromeos-steam://
- steam://
- materialized-view://
Registered schemes [^3] (Chrome parses these scheme URLs incorrectly as
special URLs with stripping port part):
- android-app:
- chrome-distiller:
- chrome-extension:
- chrome-native:
- chrome-resource:
- chrome-search:
- fuchsia-dir:
- isolated-app:
Regarding "Registered schemes", the CL uses a URL like
"chrome-native://x:0", which doesn't have a path part, as a test case.
If Chrome parses this URL incorrectly as a special URL, its string
representation (url.href
) should be "chrome-native://x:0/" (a slash is
appended since special URLs can't have an empty path).
If Chrome parses this URL correctly as a non-special URL, its string
representation (url.href
) should be "chrome-native://x:0" (non-special
URLs can have an empty path).
Note: In WPT test runner environments, Chrome may not register these
schemes [^3] because these schemes are registered at specific times in
runtime. This CL doesn't address the timing issue in Chrome, just
adding WPTs.
- [^1] https://groups.google.com/a/chromium.org/g/blink-dev/c/svzicLXbKjw/m/FJSPhwmEAQAJ
- [^2] https://source.chromium.org/chromium/chromium/src/+/main:url/url_util.cc;l=126?q=%20opaque_non_special_schemes&ss=chromium%2Fchromium%2Fsrc
- [^3] https://source.chromium.org/chromium/chromium/src/+/main:chrome/common/chrome_content_client.cc;l=233;drc=0312be31243152b47aa6158749e28f61604b54ff?q=%20kChromeStandardURLSchemes&sq=&ss=chromium%2Fchromium%2Fsrc
Bug: 40063064
Change-Id: I2eef2136496cbaf16b500c976956098998aa424f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5790445
Reviewed-by: Domenic Denicola domenic@chromium.org
Commit-Queue: Hayato Ito hayato@chromium.org
Cr-Commit-Position: refs/heads/main@{#1344587}