From 96372097657685b5655bba95ce5a329364a9301b Mon Sep 17 00:00:00 2001 From: Yacine Hmito Date: Sat, 9 Jan 2021 07:27:46 +0100 Subject: fix(web): implement DOMException#code (#9015) Co-authored-by: Luca Casonato --- cli/tests/unit/dom_exception_test.ts | 9 +++++++++ cli/tests/wpt.jsonc | 9 +-------- 2 files changed, 10 insertions(+), 8 deletions(-) (limited to 'cli/tests') diff --git a/cli/tests/unit/dom_exception_test.ts b/cli/tests/unit/dom_exception_test.ts index a93cbfebe..4c9e96de6 100644 --- a/cli/tests/unit/dom_exception_test.ts +++ b/cli/tests/unit/dom_exception_test.ts @@ -6,4 +6,13 @@ unitTest(function testDomError() { assert(de); assertEquals(de.message, "foo"); assertEquals(de.name, "bar"); + assertEquals(de.code, 0); +}); + +unitTest(function testKnownDomException() { + const de = new DOMException("foo", "SyntaxError"); + assert(de); + assertEquals(de.message, "foo"); + assertEquals(de.name, "SyntaxError"); + assertEquals(de.code, 12); }); diff --git a/cli/tests/wpt.jsonc b/cli/tests/wpt.jsonc index 3099d3b48..d43aa9ce6 100644 --- a/cli/tests/wpt.jsonc +++ b/cli/tests/wpt.jsonc @@ -170,14 +170,7 @@ ] }, "measure-l3", - { - "name": "structured-serialize-detail", - "expectFail": [ - // TODO(lucacasonato): re-enable when we use real structured clone. - "Mark: Throw an exception when the detail property cannot be structured-serialized.", - "Measure: Throw an exception when the detail property cannot be structured-serialized." - ] - }, + "structured-serialize-detail", "user_timing_exists" ] } -- cgit v1.2.3