Skip to content

Commit

Permalink
Bug 1859078 [wpt PR 42548] - url: Implement URL.canParse., a=testonly
Browse files Browse the repository at this point in the history
Automatic update from web-platform-tests
url: Implement URL.canParse.

The WPT is adjusted slightly since it currently exercises behavior
it was presumably not intended to -- namely, the quirk we have on
Windows where URLs which begin with a single letter and a colon are
interpreted as file URLs relative to the given drive letter.

The particulars of URL parsing are adequately tested elsewhere, and
this test serves to demonstrate that URL.canParse(...) behaves the
same way that new URL(...) does.

Bug: 1425839
Change-Id: I13c425c1eaea791da2ccd2a1486112b5c2d6ad0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4936216
Reviewed-by: Domenic Denicola <[email protected]>
Commit-Queue: Jeremy Roman <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1210014}

--

wpt-commits: c2d7e70b52cbd9a5b938aa32f37078d7a71e0b21
wpt-pr: 42548
  • Loading branch information
jeremyroman authored and moz-wptsync-bot committed Oct 26, 2023
1 parent acb1a04 commit 5b683ad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions testing/web-platform/tests/url/url-statics-canparse.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@
"expected": false
},
{
"url": "a:b",
"url": "aaa:b",
"base": undefined,
"expected": true
},
{
"url": undefined,
"base": "a:b",
"base": "aaa:b",
"expected": false
},
{
"url": "a:/b",
"url": "aaa:/b",
"base": undefined,
"expected": true
},
{
"url": undefined,
"base": "a:/b",
"base": "aaa:/b",
"expected": true
},
{
Expand Down

0 comments on commit 5b683ad

Please sign in to comment.