Closed Bug 1686723 Opened 4 years ago Closed 4 years ago

Refactor tests using WebConsoleFront.startListeners["NetworkActivity"] to use resourceWatcher.watchResources([NETWORK_EVENT])

Categories

(DevTools :: Netmonitor, task, P3)

task

Tracking

(Fission Milestone:M7, firefox87 fixed)

RESOLVED FIXED
87 Branch
Fission Milestone M7
Tracking Status
firefox87 --- fixed

People

(Reporter: ochameau, Assigned: nchevobbe)

References

(Blocks 1 open bug)

Details

(Whiteboard: dt-fission-m3-mvp)

Attachments

(2 files)

Bug 1665383 is going to make WebConsoleFront.startListeners["NetworkActivity"] unused by DevTools frontend. Only tests and may be some external tools using RDP may be using this old codepath.

We should refactor the tests in order to cover the new codepath, using ResourceWatcher API.
i.e. resourceWatcher.watchResources([NETWORK_EVENT])

Here is a searchfox query to help finding those:
https://searchfox.org/mozilla-central/search?q=%22NetworkActivity%22&path=&case=false&regexp=false
Today, there is 4 tests using the old API.

Note that there is also the emulation actor which uses this API from the server codebase:
https://searchfox.org/mozilla-central/rev/07342ce09126c513540c1c343476e026cfa907bf/devtools/server/actors/emulation/responsive.js#147-181
We can probably remove that, the frontend should also no longer use this API once bug 1665383 lands.

Whiteboard: dt-fission-m3-mvp

Tracking dt-fission-m3-mvp bugs for Fission M7 (blocking Beta experiment).

Fission Milestone: --- → M7
Severity: -- → S3
Priority: -- → P3

let's give it a try :)

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED

This patch switches all the calls to startListeners["NetworkActivity"] to watching
for network resources instead.
We take this opportunity to refactor them to improve readability.

Now that network resources are enabled on the server, RDM is using the network actor
to control network throttling.
We can remove all the code in the ResponsiveActor that was handling that previously.
We can't cleanup the client yet though, as network resources support was added in
86, so when connecting to an 84 server, the client would use the responsive actor.
We add a few backward compat comment on the client code so we don't forget to remove
the code when 86 reaches release.

Depends on D102700

Attachment #9198683 - Attachment description: Bug 1686723 - [devtools] Remove unused network throttling code from ResponsiveActor. r=bomsy. → Bug 1686723 - [devtools] Remove unused network throttling code from RDM client code. r=bomsy.
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1c4e9624bd68
[devtools] Observe network activity from resourceWatcher instead of webconsole listener. r=bomsy.
https://hg.mozilla.org/integration/autoland/rev/1471a0e93735
[devtools] Remove unused network throttling code from RDM client code. r=bomsy,devtools-backward-compat-reviewers.
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8956906b708e
[devtools] Observe network activity from resourceWatcher instead of webconsole listener. r=bomsy.
https://hg.mozilla.org/integration/autoland/rev/2260030e3e88
[devtools] Remove unused network throttling code from RDM client code. r=bomsy,devtools-backward-compat-reviewers.

Fixed the test, sorry about that!

Flags: needinfo?(nchevobbe)
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: