> if WPT tests can also run in non-headless mode, then [...] `nsIWidget::DispatchInputEvent()` would be the better choice. Note that, for touch events, we have `nsIDOMWindowUtils.sendTouchEvent()` whose implementation [already calls](https://searchfox.org/mozilla-central/rev/98397ff4eac3d32b815fbb33bff147297fb972d7/dom/base/nsDOMWindowUtils.cpp#937) `nsIWidget::DispatchInputEvent()` if the pref `test.events.async.enabled` is set. We may be able to reuse this codepath (adjusting the condition if encessary).
Bug 1773393 Comment 11 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
> if WPT tests can also run in non-headless mode, then [...] `nsIWidget::DispatchInputEvent()` would be the better choice. Note that, for touch events, we have `nsIDOMWindowUtils.sendTouchEvent()` whose implementation [already calls](https://searchfox.org/mozilla-central/rev/98397ff4eac3d32b815fbb33bff147297fb972d7/dom/base/nsDOMWindowUtils.cpp#937) `nsIWidget::DispatchInputEvent()` if the pref `test.events.async.enabled` is set. We may be able to reuse this codepath (adjusting the condition if necessary).