Implement URL::parse() (#32819)

* Implement URL::parse()

Signed-off-by: Shane Handley <shanehandley@fastmail.com>

* fix: Make handling more idiomatic

Signed-off-by: Shane Handley <shanehandley@fastmail.com>

---------

Signed-off-by: Shane Handley <shanehandley@fastmail.com>
This commit is contained in:
shanehandley 2024-07-22 18:48:16 +10:00 committed by GitHub
parent a007baa4cf
commit 45eabad169
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 25 additions and 129 deletions

View file

@ -1,14 +0,0 @@
[idlharness.any.worker.html]
[URL interface: operation parse(USVString, optional USVString)]
expected: FAIL
[URL interface: calling parse(USVString, optional USVString) on new URL("http://foo") with too few arguments must throw TypeError]
expected: FAIL
[idlharness.any.html]
[URL interface: operation parse(USVString, optional USVString)]
expected: FAIL
[URL interface: calling parse(USVString, optional USVString) on new URL("http://foo") with too few arguments must throw TypeError]
expected: FAIL

View file

@ -1,50 +0,0 @@
[url-statics-parse.any.worker.html]
[URL.parse(undefined, undefined)]
expected: FAIL
[URL.parse(aaa:b, undefined)]
expected: FAIL
[URL.parse(undefined, aaa:b)]
expected: FAIL
[URL.parse(aaa:/b, undefined)]
expected: FAIL
[URL.parse(undefined, aaa:/b)]
expected: FAIL
[URL.parse(https://test:test, undefined)]
expected: FAIL
[URL.parse(a, https://b/)]
expected: FAIL
[URL.parse() should return a unique object]
expected: FAIL
[url-statics-parse.any.html]
[URL.parse(undefined, undefined)]
expected: FAIL
[URL.parse(aaa:b, undefined)]
expected: FAIL
[URL.parse(undefined, aaa:b)]
expected: FAIL
[URL.parse(aaa:/b, undefined)]
expected: FAIL
[URL.parse(undefined, aaa:/b)]
expected: FAIL
[URL.parse(https://test:test, undefined)]
expected: FAIL
[URL.parse(a, https://b/)]
expected: FAIL
[URL.parse() should return a unique object]
expected: FAIL

View file

@ -1,14 +0,0 @@
[idlharness.any.worker.html]
[URL interface: operation parse(USVString, optional USVString)]
expected: FAIL
[URL interface: calling parse(USVString, optional USVString) on new URL("http://foo") with too few arguments must throw TypeError]
expected: FAIL
[idlharness.any.html]
[URL interface: operation parse(USVString, optional USVString)]
expected: FAIL
[URL interface: calling parse(USVString, optional USVString) on new URL("http://foo") with too few arguments must throw TypeError]
expected: FAIL

View file

@ -1,50 +0,0 @@
[url-statics-parse.any.worker.html]
[URL.parse(undefined, undefined)]
expected: FAIL
[URL.parse(aaa:b, undefined)]
expected: FAIL
[URL.parse(undefined, aaa:b)]
expected: FAIL
[URL.parse(aaa:/b, undefined)]
expected: FAIL
[URL.parse(undefined, aaa:/b)]
expected: FAIL
[URL.parse(https://test:test, undefined)]
expected: FAIL
[URL.parse(a, https://b/)]
expected: FAIL
[URL.parse() should return a unique object]
expected: FAIL
[url-statics-parse.any.html]
[URL.parse(undefined, undefined)]
expected: FAIL
[URL.parse(aaa:b, undefined)]
expected: FAIL
[URL.parse(undefined, aaa:b)]
expected: FAIL
[URL.parse(aaa:/b, undefined)]
expected: FAIL
[URL.parse(undefined, aaa:/b)]
expected: FAIL
[URL.parse(https://test:test, undefined)]
expected: FAIL
[URL.parse(a, https://b/)]
expected: FAIL
[URL.parse() should return a unique object]
expected: FAIL