Closed Bug 1790372 Opened 5 months ago Closed 22 days ago

Implement "network.responseCompleted" event

Categories

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

task
Points:
5

Tracking

(firefox110 fixed)

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: whimboo, Assigned: jdescottes, NeedInfo)

References

(Blocks 5 open bugs, )

Details

(Whiteboard: [webdriver:m5], [wptsync upstream])

Attachments

(2 files, 1 obsolete file)

No description provided.
Blocks: 1790362
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Blocks: 1806802
Blocks: 1806803

Valentin, another question (sorry :) )
We have a PR on the fetch spec to add a trigger for BiDi's "response completed" event: https://whatpr.org/fetch/1540.html#fetch-finale step 3.3.8

If response is a network error, run the WebDriver BiDi fetch error steps with request. Otherwise run the WebDriver BiDi response completed steps with request and response.

Do you what would be a good match to observe this from chrome privileged JS?

At the moment we started our implementation by reusing the DevTools NetworkObserver logic, but to detect the end of a response we wait for the request input stream to be closed (usually seems to trigger from https://searchfox.org/mozilla-central/rev/d62c4c4d5547064487006a1506287da394b64724/devtools/shared/network-observer/NetworkResponseListener.sys.mjs#593)

But for redirects, the redirected request and response are already partly processed when we detect that the original stream closes. So I imagine we should observe something else here. Any idea?

Flags: needinfo?(valentin.gosu)
Blocks: 1809210

NetworkObserver addResponseContent is the last observable callback for a given request, so let's start by using this as the trigger for
responseCompleted. However, as noted on the bug and on Bug 1809210, this does not meet the expectations from the spec completely so we might have to
change to another observable later.

Blocks: 1809290
Attachment #9311426 - Attachment description: Bug 1790372 - [bidi] Reuse wdspec tests for response started for response completed → Bug 1790372 - [wdspec] Reuse wdspec tests for response started for response completed
Attachment #9311426 - Attachment description: Bug 1790372 - [wdspec] Reuse wdspec tests for response started for response completed → Bug 1790372 - [wdspec] Add wdspec tests for network.responseCompleted

Depends on D166373

Blocks: 1809854

Comment on attachment 9311845 [details]
Bug 1790372 - [bidi] Do not include the charset in the mimeType

Revision D166599 was moved to bug 1809854. Setting attachment 9311845 [details] to obsolete.

Attachment #9311845 - Attachment is obsolete: true
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6956ef91ed6f
[bidi] Add basic support for network.responseCompleted event r=webdriver-reviewers,whimboo
https://hg.mozilla.org/integration/autoland/rev/89a09894a67b
[wdspec] Add wdspec tests for network.responseCompleted r=webdriver-reviewers,whimboo
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/37899 for changes under testing/web-platform/tests
Whiteboard: [webdriver:m5] → [webdriver:m5], [wptsync upstream]
Status: ASSIGNED → RESOLVED
Closed: 22 days ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
Upstream PR merged by moz-wptsync-bot
Regressions: 1810302
You need to log in before you can comment on or make changes to this bug.