Consider using BrowserTestUtils instead of our own message-manager-based mechanism to simulate clicks in debugger tests

NEW
Unassigned

Status

P3
normal
3 years ago
2 months ago

People

(Reporter: pbro, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Debugger tests often use the helper function generateMouseClickInTab to simulate clicks in the page.
This function is defined in devtools/client/debugger/test/head.js.
This is an async function that sends a message to the code_frame-script.js frame-script which, in turn, executes generateMouseClick which uses EventUtils.synthesizeMouseAtCenter.

Mochitests now have access to a helper called BrowserTestUtils which does this already.
So we should consider trading our own click-simulating-over-message-manager code for the one in BrowserTestUtils. Less code to maintain that way.

See https://dxr.mozilla.org/mozilla-central/source/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm#479

A few tests in devtools already use it.
This is essentially clean up. I definitely agree we should do it, but I don't think it has the highest priority right now. Marking this as P3 for now.
Priority: -- → P3

Updated

2 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.