naive fix
This commit is contained in:
parent
3a02389cb2
commit
9b6ce75f5f
|
|
@ -495,6 +495,8 @@ export class Frame extends SdkObject {
|
|||
this._currentDocument = { documentId: undefined, request: undefined };
|
||||
this.selectors = new FrameSelectors(this);
|
||||
|
||||
this._page.on(Page.Events.Crash, () => this._onDetached());
|
||||
|
||||
this._contextData.set('main', { contextPromise: new ManualPromise(), context: null });
|
||||
this._contextData.set('utility', { contextPromise: new ManualPromise(), context: null });
|
||||
this._setContext('main', null);
|
||||
|
|
|
|||
|
|
@ -85,5 +85,5 @@ test('should not hang when page crashed', async ({ page }) => {
|
|||
|
||||
const expectPromise = expect(page.getByText('child')).toBeVisible();
|
||||
await page.goto('chrome://crash').catch(e => {});
|
||||
await expectPromise;
|
||||
await expect(expectPromise).rejects.toThrowError();
|
||||
});
|
||||
Loading…
Reference in a new issue