Skip to content

Commit

Permalink
Bug 1917783 - Add WPT test for getAttributeType() with qualified attr…
Browse files Browse the repository at this point in the history
  • Loading branch information
fred-wang committed Oct 22, 2024
1 parent d741f21 commit 118b2d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@

[getAttributeType with explicit elementNs and attrNs parameters]
expected: FAIL

[getAttributeType with qualified attribute name]
expected: FAIL
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 118b2d5

Please sign in to comment.