chore: fix firefox tests after switching to context delegate (#34898)

This commit is contained in:
Yury Semikhatsky 2025-02-22 17:12:39 -08:00 committed by GitHub
parent e091baad79
commit 954457ba9e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 3 deletions

View File

@ -555,7 +555,7 @@ export class FFPage implements PageDelegate {
const context = await parent._mainContext();
const result = await this._session.send('Page.adoptNode', {
frameId: frame._id,
executionContextId: ((context as any)[contextDelegateSymbol] as FFExecutionContext)._executionContextId
executionContextId: (context.delegate as FFExecutionContext)._executionContextId
});
if (!result.remoteObject)
throw new Error('Frame has been detached.');
@ -570,5 +570,3 @@ export class FFPage implements PageDelegate {
function webSocketId(frameId: string, wsid: string): string {
return `${frameId}---${wsid}`;
}
const contextDelegateSymbol = Symbol('delegate');