Closed Bug 1945427 Opened 1 year ago Closed 1 year ago

Loosen netwerk/test/browser/browser_103_assets.js expectation for possibly-cached preload

Categories

(Core :: Networking, task, P3)

task

Tracking

()

RESOLVED FIXED
137 Branch
Tracking Status
firefox137 --- fixed

People

(Reporter: arai, Assigned: arai)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

browser_103_assets.js testcase observes the "earlyhints-connectback" notification:

https://searchfox.org/mozilla-central/rev/b1662b447f306e6554647914090d4b73ac8e1664/netwerk/test/browser/browser_103_assets.js#50

Services.obs.addObserver(observer, "earlyhints-connectback");

The notification is generated by EarlyHintPreloader::OnParentReady, which is called only when the AsyncOpen is called for the channel.

https://searchfox.org/mozilla-central/rev/b1662b447f306e6554647914090d4b73ac8e1664/netwerk/protocol/http/EarlyHintPreloader.cpp#532,539

void EarlyHintPreloader::OnParentReady(nsIParentChannel* aParent) {
...
    obs->NotifyObservers(mChannel, "earlyhints-connectback", nullptr);

Once the in-memory script cache (mozilla::dom::SharedScriptCache) is integrated into script preload,
the preload can skip the channel open if the script is found in the in-memory cache.

Given the notification is testing-only, I'd like to modify the testcase to allow the case where the notification isn't observed for cached script case.

Severity: -- → S3
Priority: -- → P3
Whiteboard: [necko-triaged]
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/b154fece72b2 Allow a cached script not to be notified. r=necko-reviewers,valentin DONTBUILD

sorry, I accidentally clicked the DONTBUILD checkbox

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: