Closed Bug 1503914 Opened Last year Closed Last year

[remote-dbg-next] add mochitest to test that clicking on refresh devices does not disconnect USB runtime

Categories

(DevTools :: about:debugging, enhancement, P1)

enhancement

Tracking

(firefox65 fixed)

RESOLVED FIXED
Firefox 65
Tracking Status
firefox65 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Follow up to Bug 1497917

We had this bug previously where clicking on "refresh devices" would clear the runtimeDetails of all the existing runtimes. Daisuke fixed it recently, it would be nice to have a mochitest for it.
The feature we want to test was initially implemented in Bug 1498103, but it looks like we already regressed this :)
Depends on: 1498103
This regressed because of Bug 1497448, and the following code:

    const invalidRuntimes =
      getState().runtimes.usbRuntimes.filter(r => !runtimes.includes(r));
    for (const invalidRuntime of invalidRuntimes) {
      await dispatch(disconnectRuntime(invalidRuntime.id));
    }

https://searchfox.org/mozilla-central/rev/7f7c353e969e61a6a85201cc8ad3c3de12ac30d8/devtools/client/aboutdebugging-new/src/actions/runtimes.js#216-217

Since the list of runtimes from the usb-runtimes module always returns new object, we should compare the ids instead of the objects. Otherwise we always disconnect all runtimes.
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Priority: P2 → P1
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b97a83e789c2
Stop disconnecting all devices when clicking on Refresh Devices;r=daisuke
https://hg.mozilla.org/integration/autoland/rev/85d893b16842
Add mochitest to check that USB runtimes are not disconnected on refresh;r=daisuke
https://hg.mozilla.org/mozilla-central/rev/b97a83e789c2
https://hg.mozilla.org/mozilla-central/rev/85d893b16842
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
You need to log in before you can comment on or make changes to this bug.