Bug 1825757 [wpt PR 39302] - Fix tests requiring non-standard MouseEvent.toElement...
commit7bb5c92a77d28588492c6bb8433101d8e0d803ee
authorSam Sneddon <gsnedders@apple.com>
Wed, 17 May 2023 12:54:57 +0000 (17 12:54 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Sun, 21 May 2023 22:42:56 +0000 (21 22:42 +0000)
treee02e5873d327ad43b764e10f1f303b1b4ea63b15
parent8c2efe84e3f1ded81c40c17e7b7a75caccd0c23a
Bug 1825757 [wpt PR 39302] - Fix tests requiring non-standard MouseEvent.toElement/fromElement, a=testonly

Automatic update from web-platform-tests
Remove custom PointerEvent WebIDL checks

While this checks that actual pointer event instances, created in
response to UI input via testdriver.js, conform to the spec, it
doesn't really make sense to have these tests here: if we want to have
these, these should be generated by idlharness.

This patch doesn't however introduce such idlharness tests, as the
marginal value of doing this above and beyond our existing coverage
(of a constructed PointerEvent) seems minimal.

It's also worthwhile to note that this included some non-standard
attributes, at least toElement/fromElement: see
https://github.com/web-platform-tests/interop/issues/308.

--
Make toElement/fromElement null checks optional

These are intended to test this spec text:

> NOTE: Many user agents expose non-standard attributes fromElement
> and toElement in MouseEvents to support legacy content. We encourage
> those user agents to set the values of those (inherited) attributes
> in PointerEvents to null to transition authors to the use of
> standardized alternates (i.e. target and relatedTarget).

Given this is a note, it definitely doesn't make sense for the test to
assert that they are implemented and are set to null; this loosens the
test to allow for toElement/fromElement to not be implemented (as is
the case in Firefox), though it does still go above and beyond the
spec in requiring them to be null if they are supported.

--

wpt-commits: ef6fc4906296cae9d34843ae0e156fed9454e55985f4fbdb47691e9037cde48f1f8d9c9c8c0e69f9
wpt-pr: 39302
testing/web-platform/tests/pointerevents/pointerevent_support.js