File tree 1 file changed +7
-0
lines changed 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:
231
231
context ._on_close ()
232
232
browser ._on_close ()
233
233
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.
234
241
235
242
transport .once ("close" , handle_transport_close )
236
243
You can’t perform that action at this time.
0 commit comments