Closed Bug 1633831 Opened 5 years ago Closed 2 years ago

Add support for throttling connections to Network.emulateNetworkConditions

Categories

(Remote Protocol :: CDP, task, P3)

task

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: whimboo, Unassigned)

References

Details

Bug 1553849 will add support for the offline mode only. To get connection throttling implemented some more investigation is necessary.

Here something from Etienne as brought up on bug 1553849:

(In reply to Etienne Bruines from bug 1553849 comment #15)

Regarding the broader definition of Network.emulateNetworkConditions:

Do we have access to the consoleActor, which contains NetworkMonitor.throttleData?

In this example from the devtools, it seems very doable to simulate latency, as well as downloadSpeed and uploadSpeed. At least in the way people expect, by acting the same way as the devtools settings do.

(In reply to Henrik Skupin (:whimboo) [⌚️UTC+2] from comment #0)

Do we have access to the consoleActor, which contains NetworkMonitor.throttleData?

No, this is devtools. We need our own implementation but could clearly check how it has been implemented for that other product.

I had a quick look at devtools and everything seems to be implemented here:
https://searchfox.org/mozilla-central/source/devtools/shared/webconsole/throttle.js

As it looks like they register listeners for HTTP channels, which delay the delivery of the data.

Blocks: 1627668
Component: CDP: Network → CDP

This won't happen for the CDP implementation. Instead we will include it in WebDriver BiDi.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.