summaryrefslogtreecommitdiff
path: root/test/fixtures/wpt/url/historical.any.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/fixtures/wpt/url/historical.any.js')
-rw-r--r--test/fixtures/wpt/url/historical.any.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/fixtures/wpt/url/historical.any.js b/test/fixtures/wpt/url/historical.any.js
index cbeb36a63f..9c4b5f0ae9 100644
--- a/test/fixtures/wpt/url/historical.any.js
+++ b/test/fixtures/wpt/url/historical.any.js
@@ -36,4 +36,11 @@ test(() => {
assert_throws_dom("DataCloneError", () => self.structuredClone(new URLSearchParams()));
}, "URLSearchParams: no structured serialize/deserialize support");
+test(() => {
+ const url = new URL("about:blank");
+ url.toString = () => { throw 1 };
+ assert_throws_exactly(1, () => new URL(url), "url argument");
+ assert_throws_exactly(1, () => new URL("about:blank", url), "base argument");
+}, "Constructor only takes strings");
+
done();