mirror of
https://github.com/microsoft/playwright.git
synced 2024-10-28 06:07:53 +03:00
browser(firefox): fix screencast start event for popups (#3834)
This commit is contained in:
parent
1e8e24c3d0
commit
25b199b40a
@ -1,2 +1,2 @@
|
||||
1172
|
||||
Changed: yurys@chromium.org Wed Sep 9 23:06:13 PDT 2020
|
||||
1173
|
||||
Changed: yurys@chromium.org Thu Sep 10 12:35:25 PDT 2020
|
||||
|
@ -196,11 +196,6 @@ class TargetRegistry {
|
||||
const browserContext = this._userContextIdToBrowserContext.get(userContextId);
|
||||
if (browserContext && browserContext.defaultViewportSize)
|
||||
setViewportSizeForBrowser(browserContext.defaultViewportSize, tab.linkedBrowser, window);
|
||||
|
||||
const linkedBrowser = tab.linkedBrowser;
|
||||
const target = this._browserToTarget.get(linkedBrowser);
|
||||
if (target)
|
||||
target._pageWindowReadyCallback();
|
||||
};
|
||||
|
||||
const onTabCloseListener = event => {
|
||||
@ -325,7 +320,6 @@ class TargetRegistry {
|
||||
});
|
||||
if (browserContext && browserContext.defaultViewportSize)
|
||||
setViewportSizeForBrowser(browserContext.defaultViewportSize, browser, window);
|
||||
target._pageWindowReadyCallback();
|
||||
browser.focus();
|
||||
if (browserContext.settings.timezoneId) {
|
||||
if (await target.hasFailedToOverrideTimezone())
|
||||
@ -382,7 +376,10 @@ class PageTarget {
|
||||
browserContext._firstPageCallback();
|
||||
this._registry._browserToTarget.set(this._linkedBrowser, this);
|
||||
this._registry._browserBrowsingContextToTarget.set(this._linkedBrowser.browsingContext, this);
|
||||
this._pageWindowReady = new Promise(r => this._pageWindowReadyCallback = r);
|
||||
}
|
||||
|
||||
async windowReady() {
|
||||
await waitForWindowReady(this._window);
|
||||
}
|
||||
|
||||
linkedBrowser() {
|
||||
|
@ -140,7 +140,7 @@ class PageHandler {
|
||||
// On Mac the window may not yet be visible when TargetCreated and its
|
||||
// NSWindow.windowNumber may be -1, so we wait until the window is known
|
||||
// to be initialized and visible.
|
||||
await this._pageTarget._pageWindowReady;
|
||||
await this._pageTarget.windowReady();
|
||||
await this.startVideoRecording(Object.assign({file}, options));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user