Add test for NetworkObserver
Categories
(DevTools :: General, task, P1)
Tracking
(firefox109 fixed)
Tracking | Status | |
---|---|---|
firefox109 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jdescottes)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [webdriver:m5])
Attachments
(2 files)
We are moving the network observer to a dedicated folder in Bug 1788777, let's write a test for it to help with upcoming refactors.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
While writing a test, I forgot that the filter function was an "ignore" function. Using named arguments should avoid this. Maybe we should
consider using a regular filter approach (ie return true if we want to keep the request)?
Assignee | ||
Comment 2•3 years ago
|
||
Depends on D162193
This adds only very basic tests for the observer, but I would like to discuss about switching the API to a fully event-based solution.
I initially decided against it because I didn't want to create unnecessary changes for DevTools, but in the end, the owner pattern is quite verbose if
we want to use it for testing. Having events instead would make it more flexible, we could test only what we are interested in, with minimal overhead.
If we agree on this, we can land those very simple tests and I can move on to change the API to use events and update the tests, before we add more
tests.
Comment 4•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6fe1a36f4c06
https://hg.mozilla.org/mozilla-central/rev/a7400b45e2e4
Description
•