Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

browser(firefox): send screencastStarted after attachedToTarget (#3554)

Yury Semikhatsky9f3a1b516862
diff --git a/browser_patches/firefox/BUILD_NUMBER b/browser_patches/firefox/BUILD_NUMBER
index b800a0ea81..4133844557 100644
--- a/browser_patches/firefox/BUILD_NUMBER
+++ b/browser_patches/firefox/BUILD_NUMBER
@@ -1,2 +1,2 @@
-1165
-Changed: [email protected] Thu Aug 20 13:05:37 PDT 2020
+1166
+Changed: [email protected] Thu Aug 20 13:55:50 PDT 2020
diff --git a/browser_patches/firefox/juggler/protocol/BrowserHandler.js b/browser_patches/firefox/juggler/protocol/BrowserHandler.js
index 63908ecf1e..f5d0e087eb 100644
--- a/browser_patches/firefox/juggler/protocol/BrowserHandler.js
+++ b/browser_patches/firefox/juggler/protocol/BrowserHandler.js
@@ -33,13 +33,13 @@ class BrowserHandler {
if (!this._shouldAttachToTarget(target))
continue;
const session = this._dispatcher.createSession();
- target.initSession(session);
- target.connectSession(session);
this._attachedSessions.set(target, session);
this._session.emitEvent('Browser.attachedToTarget', {
sessionId: session.sessionId(),
targetInfo: target.info()
});
+ target.initSession(session);
+ target.connectSession(session);
}
this._eventListeners = [
@@ -92,12 +92,12 @@ class BrowserHandler {
if (!this._shouldAttachToTarget(target))
return;
const session = this._dispatcher.createSession();
- target.initSession(session);
this._attachedSessions.set(target, session);
this._session.emitEvent('Browser.attachedToTarget', {
sessionId: session.sessionId(),
targetInfo: target.info()
});
+ target.initSession(session);
sessions.push(session);
}