diff --git a/src/browserContext.ts b/src/browserContext.ts index 60326d94e3380..6d8f56c53505d 100644 --- a/src/browserContext.ts +++ b/src/browserContext.ts @@ -127,6 +127,8 @@ export class BrowserContext extends platform.EventEmitter { _browserClosed() { this._closed = true; + for (const page of this._delegate.existingPages()) + page._didClose(); this.emit(Events.BrowserContext.Close); } }