Skip to content

Commit

Permalink
Bug 1934650 [wpt PR 49473] - Update Trusted Types content attributes …
Browse files Browse the repository at this point in the history
…test, a=testonly

Automatic update from web-platform-tests
Update Trusted Types content attributes test (#49473)

- Skip attributes that are in WPT IDL but are not implemented in browser IDL.

- Add comment explaining why each set of attributes are included.

encrypted-media event listeners are an interesting case, they're only a TT sink in Firefox currently but as specced they should be in all browsers, so I've kept the tests for them.

See w3c/trusted-types#520 for further discussion on the spec.
--

wpt-commits: 59d1f701fbfaff1b24accfb35b8db182cd19077c
wpt-pr: 49473

UltraBlame original commit: 4ab121f6dc236438b12ff96939229befac539038
  • Loading branch information
marco-c committed Dec 13, 2024
1 parent 7296b05 commit a0291fd
Showing 1 changed file with 186 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
)
{
let
attributeNames
attributeNamesWithInterfaceName
=
[
]
Expand Down Expand Up @@ -402,11 +402,14 @@
name
=
>
attributeNames
attributeNamesWithInterfaceName
.
push
(
{
name
interfaceName
}
)
)
;
Expand Down Expand Up @@ -434,6 +437,25 @@
(
)
;
/
/
GlobalEventHandlers
exist
on
HTMLElement
SVGElement
and
MathMLElement
.
/
/
WindowEventHandlers
exist
on
HTMLBodyElement
and
HTMLFrameSetElement
.
[
"
GlobalEventHandlers
Expand All @@ -459,7 +481,7 @@
)
;
const
entrypedMediaIDL
encryptedMediaIDL
=
await
(
Expand All @@ -483,9 +505,29 @@
(
)
;
/
/
HTMLMediaElement
(
the
parent
for
<
audio
>
and
<
video
>
)
has
extra
event
handlers
.
addOnAttributes
(
entrypedMediaIDL
encryptedMediaIDL
"
HTMLMediaElement
"
Expand Down Expand Up @@ -516,6 +558,14 @@
(
)
;
/
/
SVGAnimationElement
has
extra
event
handlers
.
addOnAttributes
(
svgAnimationsIDL
Expand All @@ -527,11 +577,135 @@
for
(
const
attributeName
attributeNameWithInterfaceName
of
attributeNames
attributeNamesWithInterfaceName
)
{
/
/
Skip
attributes
that
are
not
implemented
in
the
browser
.
if
(
attributeNameWithInterfaceName
.
interfaceName
=
=
=
'
GlobalEventHandlers
'
&
&
!
(
attributeNameWithInterfaceName
.
name
in
HTMLElement
.
prototype
)
)
{
continue
;
}
if
(
attributeNameWithInterfaceName
.
interfaceName
=
=
=
'
WindowEventHandlers
'
&
&
!
(
attributeNameWithInterfaceName
.
name
in
HTMLBodyElement
.
prototype
)
)
{
continue
;
}
if
(
attributeNameWithInterfaceName
.
interfaceName
=
=
=
'
HTMLMediaElement
'
&
&
!
(
attributeNameWithInterfaceName
.
name
in
HTMLMediaElement
.
prototype
)
)
{
continue
;
}
if
(
attributeNameWithInterfaceName
.
interfaceName
=
=
=
'
SVGAnimationElement
'
&
&
!
(
attributeNameWithInterfaceName
.
name
in
SVGAnimationElement
.
prototype
)
)
{
continue
;
}
promise_test
(
async
Expand All @@ -557,7 +731,9 @@
"
dummy
"
attributeName
attributeNameWithInterfaceName
.
name
"
dummyNs
"
Expand Down Expand Up @@ -595,7 +771,9 @@
"
"
{
attributeName
attributeNameWithInterfaceName
.
name
}
"
"
Expand Down

0 comments on commit a0291fd

Please sign in to comment.