Support "network.responseCompleted" for cached responses
Categories
(Remote Protocol :: WebDriver BiDi, task, P1)
Tracking
(firefox113 fixed)
Tracking | Status | |
---|---|---|
firefox113 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jdescottes)
References
Details
(Whiteboard: [webdriver:m6], [wptsync upstream] [webdriver:relnote])
Attachments
(1 file, 1 obsolete file)
Similarly to Bug 1806794, we will handled cached responses after the basic implementation is done. We should wait for Bug 1806794 to be fixed so that we can easily add tests for this.
There is only one trigger for response completed, so this should hopefully be easier.
Assignee | ||
Updated•6 months ago
|
Assignee | ||
Comment 1•5 months ago
|
||
I am planning to disable the 304 test case for response completed over at https://bugzilla.mozilla.org/show_bug.cgi?id=1810302 because it seems to fail very frequently on android.
Assignee | ||
Updated•3 months ago
|
Assignee | ||
Comment 2•3 months ago
|
||
Hi Valentin,
Quick question about checking if a response comes from the local cache.
At the moment, DevTools is mostly relying on the fact that the channel was detected by a http-on-examine-cached-response
notification. For BiDi, I initially wanted to rely more on channel APIs, in this case nsICacheInfoChannel.isFromCache
.
But when adding test cases, I don't always get the expected value from this API. For cached 200 OK
responses it seems to work fine. However I was also testing with a 301 Moved Permanently
response and here I always get false
from nsICacheInfoChannel.isFromCache
.
From BiDi's point of view we mark requests as cached if the response's cache state is local
. Do you think I should be able to consistently use nsICacheInfoChannel.isFromCache
to get this information, or should I rather follow the DevTools approach and just rely on the http-on-examine-cached-response
notification?
Maybe I am calling the API at the wrong time, but I would expect it to return undefined in this case, whereas here it returns false.
Assignee | ||
Comment 3•3 months ago
|
||
Comment 4•3 months ago
|
||
Comment on attachment 9320893 [details]
Bug 1806802 - Support "network.response" events for cached responses
Revision D171508 was moved to bug 1806794. Setting attachment 9320893 [details] to obsolete.
Assignee | ||
Comment 5•3 months ago
|
||
Depends on D171547
Comment 6•3 months ago
|
||
(In reply to Julian Descottes [:jdescottes] from comment #2)
Hi Valentin,
Quick question about checking if a response comes from the local cache.
At the moment, DevTools is mostly relying on the fact that the channel was detected by ahttp-on-examine-cached-response
notification. For BiDi, I initially wanted to rely more on channel APIs, in this casensICacheInfoChannel.isFromCache
.But when adding test cases, I don't always get the expected value from this API. For cached
200 OK
responses it seems to work fine. However I was also testing with a301 Moved Permanently
response and here I always getfalse
fromnsICacheInfoChannel.isFromCache
.
Are you checking nsICacheInfoChannel.isFromCache
during onStartRequest, or some other notification?
If it's onStartRequest it likely wouldn't work, because we don't send onStartRequest for the 301 response, but for the final response after the redirect.
I think the attribute should return the correct value when called from OnExamineResponse - but I haven't checked.
If you have a failing test case I can add it to bug 1817750.
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/42ef14d95f27 [wdspec] Add wdspec test for cached responseCompleted events r=webdriver-reviewers,whimboo,jgraham
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/39031 for changes under testing/web-platform/tests
Updated•3 months ago
|
Comment 9•3 months ago
|
||
bugherder |
Upstream PR merged by moz-wptsync-bot
Assignee | ||
Updated•1 month ago
|
Description
•