File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -231,6 +231,13 @@ def handle_transport_close(reason: Optional[str]) -> None:
231231 context ._on_close ()
232232 browser ._on_close ()
233233 connection .cleanup (reason )
234+ # TODO: Backport https://github.com/microsoft/playwright/commit/d8d5289e8692c9b1265d23ee66988d1ac5122f33
235+ # Give a chance to any API call promises to reject upon page/context closure.
236+ # This happens naturally when we receive page.onClose and browser.onClose from the server
237+ # in separate tasks. However, upon pipe closure we used to dispatch them all synchronously
238+ # here and promises did not have a chance to reject.
239+ # The order of rejects vs closure is a part of the API contract and our test runner
240+ # relies on it to attribute rejections to the right test.
234241
235242 transport .once ("close" , handle_transport_close )
236243
You can’t perform that action at this time.
0 commit comments