From d4dc575e722c495dc97c31610f6949d0104467df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Wang?= Date: Tue, 22 Oct 2024 22:33:57 +0000 Subject: [PATCH] Bug 1917783 - Add WPT test for getAttributeType() with qualified attribute name. r=smaug See https://github.com/w3c/trusted-types/issues/496#issuecomment-2428834747 Differential Revision: https://phabricator.services.mozilla.com/D226476 --- ...ustedTypePolicyFactory-getPropertyType.tentative.html.ini | 3 +++ .../TrustedTypePolicyFactory-getPropertyType.tentative.html | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/testing/web-platform/meta/trusted-types/TrustedTypePolicyFactory-getPropertyType.tentative.html.ini b/testing/web-platform/meta/trusted-types/TrustedTypePolicyFactory-getPropertyType.tentative.html.ini index ccfb73756e6d1..f4f0a4e3cd388 100644 --- a/testing/web-platform/meta/trusted-types/TrustedTypePolicyFactory-getPropertyType.tentative.html.ini +++ b/testing/web-platform/meta/trusted-types/TrustedTypePolicyFactory-getPropertyType.tentative.html.ini @@ -13,3 +13,6 @@ [getAttributeType with explicit elementNs and attrNs parameters] expected: FAIL + + [getAttributeType with qualified attribute name] + expected: FAIL diff --git a/testing/web-platform/tests/trusted-types/TrustedTypePolicyFactory-getPropertyType.tentative.html b/testing/web-platform/tests/trusted-types/TrustedTypePolicyFactory-getPropertyType.tentative.html index a19c685b52ab8..50b1fb55ddbcf 100644 --- a/testing/web-platform/tests/trusted-types/TrustedTypePolicyFactory-getPropertyType.tentative.html +++ b/testing/web-platform/tests/trusted-types/TrustedTypePolicyFactory-getPropertyType.tentative.html @@ -134,5 +134,10 @@ assert_equals(trustedTypes.getAttributeType("script", "href", NSURI_SVG.toUpperCase(), NSURI_XLINK), null, "case-sensitiveness of elementNs"); assert_equals(trustedTypes.getAttributeType("script", "href", NSURI_SVG, NSURI_XLINK.toUpperCase()), null, "case-sensitiveness of attrNs"); }, "getAttributeType with explicit elementNs and attrNs parameters"); + + test(t => { + assert_equals(trustedTypes.getAttributeType("script", "href", NSURI_SVG, NSURI_XLINK), "TrustedScriptURL", "local name 'href'"); + assert_equals(trustedTypes.getAttributeType("script", "xlink:href", NSURI_SVG, NSURI_XLINK), null, "qualified name 'xlink:href'"); + }, "getAttributeType with qualified attribute name");