mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
Implement URL's toJSON()
This commit is contained in:
parent
6840c18389
commit
66e3d545eb
5 changed files with 7 additions and 32 deletions
|
@ -279,4 +279,9 @@ impl URLMethods for URL {
|
||||||
fn SetUsername(&self, value: USVString) {
|
fn SetUsername(&self, value: USVString) {
|
||||||
UrlHelper::SetUsername(&mut self.url.borrow_mut(), value);
|
UrlHelper::SetUsername(&mut self.url.borrow_mut(), value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://url.spec.whatwg.org/#dom-url-tojson
|
||||||
|
fn ToJSON(&self) -> USVString {
|
||||||
|
self.Href()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,8 @@ interface URL {
|
||||||
// static DOMString createFor(Blob blob);
|
// static DOMString createFor(Blob blob);
|
||||||
static void revokeObjectURL(DOMString url);
|
static void revokeObjectURL(DOMString url);
|
||||||
|
|
||||||
|
USVString toJSON();
|
||||||
|
|
||||||
// This is only doing as well as gecko right now.
|
// This is only doing as well as gecko right now.
|
||||||
// https://github.com/servo/servo/issues/7590 is on file for
|
// https://github.com/servo/servo/issues/7590 is on file for
|
||||||
// adding attribute stringifier support.
|
// adding attribute stringifier support.
|
||||||
|
|
|
@ -2,18 +2,9 @@
|
||||||
[idlharness]
|
[idlharness]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[URL interface: operation toJSON()]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[URLSearchParams interface: operation sort()]
|
[URLSearchParams interface: operation sort()]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Test toJSON operation of URL]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[URL interface: new URL("http://foo") must inherit property "toJSON()" with the proper type]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Testing Symbol.iterator property of iterable interface URLSearchParams]
|
[Testing Symbol.iterator property of iterable interface URLSearchParams]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -28,18 +19,9 @@
|
||||||
[idlharness]
|
[idlharness]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[URL interface: operation toJSON()]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[URLSearchParams interface: operation sort()]
|
[URLSearchParams interface: operation sort()]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Test toJSON operation of URL]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[URL interface: new URL("http://foo") must inherit property "toJSON()" with the proper type]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Testing Symbol.iterator property of iterable interface URLSearchParams]
|
[Testing Symbol.iterator property of iterable interface URLSearchParams]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
[url-tojson.any.html]
|
|
||||||
[url-tojson]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
||||||
[url-tojson.any.worker.html]
|
|
||||||
[url-tojson]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[url-tojson.html]
|
|
||||||
type: testharness
|
|
||||||
[URL's toJSON()]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue