Closed Bug 1916977 Opened 1 year ago Closed 1 year ago

[wdspec] Add tests for network events for cached javascript files

Categories

(Remote Protocol :: WebDriver BiDi, task, P2)

task
Points:
2

Tracking

(firefox133 fixed)

RESOLVED FIXED
133 Branch
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.

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.

Flags: needinfo?(arai.unmht)

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.

Flags: needinfo?(arai.unmht)

Thanks! So yes it would be great if this was only using a single notification so devtools/bidi automatically pickup the new resources

See Also: → 1916960, stencil-nav, 1896709

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.

Points: --- → 2
Priority: -- → P2
Whiteboard: [webdriver:m12]
Whiteboard: [webdriver:m12] → [webdriver:m13]
Assignee: nobody → aborovova
Status: NEW → ASSIGNED
Pushed by aborovova@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e90edd140de4 [wdspec] Add tests for network events for cached javascript files. r=webdriver-reviewers,jdescottes
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/48412 for changes under testing/web-platform/tests
Whiteboard: [webdriver:m13] → [webdriver:m13], [wptsync upstream]
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
Upstream PR merged by moz-wptsync-bot
Blocks: 1962995
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: