fix(bidi): set initial frame url from creation event (#34198)
This commit is contained in:
parent
6bdd2694ee
commit
dca95ba609
|
|
@ -152,6 +152,9 @@ export class BidiBrowser extends Browser {
|
||||||
continue;
|
continue;
|
||||||
page._session.addFrameBrowsingContext(event.context);
|
page._session.addFrameBrowsingContext(event.context);
|
||||||
page._page._frameManager.frameAttached(event.context, parentFrameId);
|
page._page._frameManager.frameAttached(event.context, parentFrameId);
|
||||||
|
const frame = page._page._frameManager.frame(event.context);
|
||||||
|
if (frame)
|
||||||
|
frame._url = event.url;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
@ -164,6 +167,7 @@ export class BidiBrowser extends Browser {
|
||||||
const session = this._connection.createMainFrameBrowsingContextSession(event.context);
|
const session = this._connection.createMainFrameBrowsingContextSession(event.context);
|
||||||
const opener = event.originalOpener && this._bidiPages.get(event.originalOpener);
|
const opener = event.originalOpener && this._bidiPages.get(event.originalOpener);
|
||||||
const page = new BidiPage(context, session, opener || null);
|
const page = new BidiPage(context, session, opener || null);
|
||||||
|
page._page.mainFrame()._url = event.url;
|
||||||
this._bidiPages.set(event.context, page);
|
this._bidiPages.set(event.context, page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -310,7 +310,7 @@ library/browsercontext-network-event.spec.ts › BrowserContext.Events.RequestFi
|
||||||
library/browsercontext-network-event.spec.ts › BrowserContext.Events.Response [pass]
|
library/browsercontext-network-event.spec.ts › BrowserContext.Events.Response [pass]
|
||||||
library/browsercontext-network-event.spec.ts › should fire events in proper order [pass]
|
library/browsercontext-network-event.spec.ts › should fire events in proper order [pass]
|
||||||
library/browsercontext-network-event.spec.ts › should not fire events for favicon or favicon redirects [unknown]
|
library/browsercontext-network-event.spec.ts › should not fire events for favicon or favicon redirects [unknown]
|
||||||
library/browsercontext-page-event.spec.ts › should fire page lifecycle events [fail]
|
library/browsercontext-page-event.spec.ts › should fire page lifecycle events [pass]
|
||||||
library/browsercontext-page-event.spec.ts › should have about:blank for empty url with domcontentloaded [fail]
|
library/browsercontext-page-event.spec.ts › should have about:blank for empty url with domcontentloaded [fail]
|
||||||
library/browsercontext-page-event.spec.ts › should have about:blank url with domcontentloaded [fail]
|
library/browsercontext-page-event.spec.ts › should have about:blank url with domcontentloaded [fail]
|
||||||
library/browsercontext-page-event.spec.ts › should have an opener [pass]
|
library/browsercontext-page-event.spec.ts › should have an opener [pass]
|
||||||
|
|
|
||||||
|
|
@ -312,7 +312,7 @@ library/browsercontext-network-event.spec.ts › BrowserContext.Events.Response
|
||||||
library/browsercontext-network-event.spec.ts › should fire events in proper order [pass]
|
library/browsercontext-network-event.spec.ts › should fire events in proper order [pass]
|
||||||
library/browsercontext-network-event.spec.ts › should not fire events for favicon or favicon redirects [unknown]
|
library/browsercontext-network-event.spec.ts › should not fire events for favicon or favicon redirects [unknown]
|
||||||
library/browsercontext-network-event.spec.ts › should reject response.finished if context closes [timeout]
|
library/browsercontext-network-event.spec.ts › should reject response.finished if context closes [timeout]
|
||||||
library/browsercontext-page-event.spec.ts › should fire page lifecycle events [fail]
|
library/browsercontext-page-event.spec.ts › should fire page lifecycle events [pass]
|
||||||
library/browsercontext-page-event.spec.ts › should have about:blank for empty url with domcontentloaded [timeout]
|
library/browsercontext-page-event.spec.ts › should have about:blank for empty url with domcontentloaded [timeout]
|
||||||
library/browsercontext-page-event.spec.ts › should have about:blank url with domcontentloaded [pass]
|
library/browsercontext-page-event.spec.ts › should have about:blank url with domcontentloaded [pass]
|
||||||
library/browsercontext-page-event.spec.ts › should have an opener [pass]
|
library/browsercontext-page-event.spec.ts › should have an opener [pass]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue