[wdspec] Add tests for network events for cached javascript files
Categories
(Remote Protocol :: WebDriver BiDi, task, P2)
Tracking
(firefox133 fixed)
| Tracking | Status | |
|---|---|---|
| firefox133 | --- | fixed |
People
(Reporter: Sasha, Assigned: Sasha)
References
(Blocks 4 open bugs)
Details
(Whiteboard: [webdriver:m13], [wptsync upstream])
Attachments
(1 file)
At the moment, we have some puppeteer tests verifying the network events for cached javascript files, but not wdspec tests, so should add them for all 3 network events. We can use as a base the tests for cached stylesheet files: https://searchfox.org/mozilla-central/source/testing/web-platform/tests/webdriver/tests/bidi/network/before_request_sent/before_request_sent.py.
Comment 1•1 year ago
|
||
Hi Arai!
I noticed your comment on https://phabricator.services.mozilla.com/D220571#inline-1228795
Could you share the bug where you are planning to add a notification for the JS cache loader? I imagine that once you do that and cached scripts no longer emit the usual network event observer, it would be great to unify all those cached resources notifications so that we don't miss those requests in devtools/bidi.
This bug is about adding tests for cached scripts, although I believe such a regression would be picked up by puppeteer tests and devtools tests.
Comment 2•1 year ago
|
||
the notification will be added in bug 1916960, at the same time as handling more cases for CSS loader as well, given JS cache and CSS cache share the underlying implementation (SharedSubResourceCache).
The prototype for the JS cache was added by bug 1896709, with pref-ed off by default.
The cache will be enabled under bug 1670403 once all blockers are fixed.
Comment 3•1 year ago
|
||
Thanks! So yes it would be great if this was only using a single notification so devtools/bidi automatically pickup the new resources
Comment 4•1 year ago
|
||
In the review for Bug 1917805, we discussed about parametrizing the cached stylesheet tests in order to cover also images and JS. However as seen on https://phabricator.services.mozilla.com/D222454, JS actually behaves a bit differently compared to stylesheets (duplicated script tags will actually each trigger a fetch call).
Does not mean we shouldn't parametrize the existing test but it might make it a bit more complex.
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 5•1 year ago
|
||
Comment 8•1 year ago
|
||
| bugherder | ||
Description
•