Skip to content

Commit

Permalink
Add WPT test for getAttributeType() with qualified attribute name.
Browse files Browse the repository at this point in the history
See w3c/trusted-types#496 (comment)

Differential Revision: https://phabricator.services.mozilla.com/D226476

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1917783
gecko-commit: aba2bd9d817f21ac8a590235dc6635861aea19eb
gecko-reviewers: smaug
  • Loading branch information
fred-wang authored and moz-wptsync-bot committed Oct 23, 2024
1 parent fc84b07 commit 8a1816f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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");
</script>
</body>

0 comments on commit 8a1816f

Please sign in to comment.