Skip to content

Commit

Permalink
Bug 1926286 - Add WPT tests for getPropertyType/getAttributeType with…
Browse files Browse the repository at this point in the history
… explicit null elementNs/attrNs. r=smaug

See w3c/trusted-types#553

Differential Revision: https://phabricator.services.mozilla.com/D226547
  • Loading branch information
fred-wang committed Oct 23, 2024
1 parent b635460 commit 1527d42
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[TrustedTypePolicyFactory-getPropertyType.tentative.html]
[getPropertyType/getAttributeType with explicit null elementNs/attrNs]
expected: FAIL
Original file line number Diff line number Diff line change
Expand Up @@ -139,5 +139,11 @@
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");

test(t => {
assert_equals(trustedTypes.getPropertyType("iframe", "srcdoc", null), "TrustedHTML", "null elementNs in getPropertyType");
assert_equals(trustedTypes.getAttributeType("iframe", "srcdoc", null, NSURI_EMPTY), "TrustedHTML", "null elementNs in getAttributeType");
assert_equals(trustedTypes.getAttributeType("iframe", "srcdoc", NSURI_HTML, null), "TrustedHTML", "null attrNs in getAttributeType");
}, "getPropertyType/getAttributeType with explicit null elementNs/attrNs");
</script>
</body>

0 comments on commit 1527d42

Please sign in to comment.