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 0de236f6a79a8..ccfb73756e6d1 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 @@ -10,3 +10,6 @@ [ASCII case-insensitivity of tag name and attribute parameters] expected: FAIL + + [getAttributeType with explicit elementNs and attrNs parameters] + 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 40e355f6c451f..a19c685b52ab8 100644 --- a/testing/web-platform/tests/trusted-types/TrustedTypePolicyFactory-getPropertyType.tentative.html +++ b/testing/web-platform/tests/trusted-types/TrustedTypePolicyFactory-getPropertyType.tentative.html @@ -117,5 +117,22 @@ }); assert_equals(trustedTypes.getPropertyType("iframe", "srcdoc", NSURI_HTML.toUpperCase()), null, "case-sensitiveness"); }, "getPropertyType with an explicit elementNs parameter"); + + test(t => { + NSURI_ARRAY.forEach(elementNs => { + const emptyOrHTMLElementNs = (elementNs === NSURI_EMPTY || elementNs === NSURI_HTML); + NSURI_ARRAY.forEach(attrNs => { + const emptyAttrNs = (attrNs === NSURI_EMPTY); + assert_equals(trustedTypes.getAttributeType("iframe", "srcdoc", elementNs, attrNs), + emptyOrHTMLElementNs && emptyAttrNs ? "TrustedHTML" : null); + assert_equals(trustedTypes.getAttributeType("script", "src", elementNs, attrNs), + emptyOrHTMLElementNs && emptyAttrNs ? "TrustedScriptURL" : null); + assert_equals(trustedTypes.getAttributeType("script", "href", elementNs, attrNs), + elementNs === NSURI_SVG && (emptyAttrNs || attrNs === NSURI_XLINK) ? "TrustedScriptURL" : null); + }); + }); + 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");