-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add full parameters for emulateNetworkConditions #24144
Conversation
Size Change: 0 B Total Size: 1.16 MB ℹ️ View Unchanged
|
02e53bb
to
c6b671d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
// Upload speed (bytes/s) | ||
uploadThroughput: ( ( 750 * 1024 ) / 8 ) * 0.9, | ||
// Latency (ms) | ||
latency: 150 * 3.75, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These numbers (particularly 150
and 0.9
) are a bit "magic" so I think let's link to https://github.com/ChromeDevTools/devtools-frontend/blob/80c102878fd97a7a696572054007d40560dcdd21/front_end/sdk/NetworkManager.js#L252-L274 in an inline comment.
c6b671d
to
0459a5e
Compare
Description
Fixes #23982 by replacing
DOWNLOAD_THROUGHPUT
withSLOW_NETWORK
, that passes a fixed set of parameters toNetwork.emulateNetworkConditions
so it can work correctly. The exact values are taken from ChromeDevTools Fast 3G emulation settings.Also adds an
OFFLINE
option, that allows simulation of offline conditions.How has this been tested?
Tested by running the e2e tests and verifying that they run slower when
SLOW_NETWORK=true
is added beforenpm run test-e2e
; also that multiplenet::ERR_INTERNET_DISCONNECTED
appear whenOFFLINE=true
is added.Screenshots
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: