github web-platform-tests/wpt merge_pr_47702

latest releases: merge_pr_49470, epochs/three_hourly/2024-12-03_06H, epochs/six_hourly/2024-12-03_06H...
12 months ago

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.

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}

Don't miss a new wpt release

NewReleases is sending notifications on new releases.