From fea122d51e76dc48d974f157d11ef424e070c20a Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Tue, 13 Dec 2022 22:58:03 +0100 Subject: [PATCH] test: enable idlharness WebCryptoAPI WPTs PR-URL: https://github.com/nodejs/node/pull/45822 Reviewed-By: Colin Ihrig Reviewed-By: Antoine du Hamel Reviewed-By: Daeyeon Jeong Reviewed-By: Luigi Pinca --- test/wpt/status/WebCryptoAPI.json | 14 +++++++++++++- test/wpt/test-webcrypto.js | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/test/wpt/status/WebCryptoAPI.json b/test/wpt/status/WebCryptoAPI.json index 9f101f6cdd92c9..7e61cb4b5a47d8 100644 --- a/test/wpt/status/WebCryptoAPI.json +++ b/test/wpt/status/WebCryptoAPI.json @@ -6,6 +6,18 @@ "skip": "Not relevant in Node.js context" }, "idlharness.https.any.js": { - "skip": "Various non-IDL-compliant things" + "fail": { + "expected": [ + "Crypto interface: existence and properties of interface object", + "Crypto interface: calling getRandomValues(ArrayBufferView) on crypto with too few arguments must throw TypeError", + "CryptoKey interface: existence and properties of interface object", + "CryptoKey interface: existence and properties of interface prototype object", + "CryptoKey interface: attribute type", + "CryptoKey interface: attribute extractable", + "CryptoKey interface: attribute algorithm", + "CryptoKey interface: attribute usages", + "Window interface: attribute crypto" + ] + } } } diff --git a/test/wpt/test-webcrypto.js b/test/wpt/test-webcrypto.js index 9a1be0747a2a7e..fc253ca05d6783 100644 --- a/test/wpt/test-webcrypto.js +++ b/test/wpt/test-webcrypto.js @@ -12,4 +12,6 @@ runner.setInitScript(` global.location = {}; `); +runner.pretendGlobalThisAs('Window'); + runner.runJsTests();