Skip to content

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

fix(webkit): switch to unique loader ids (#454)

Yury Semikhatskyfd5c872d7f76
diff --git a/package.json b/package.json
index 91dce8dcc8..3052a8f488 100644
--- a/package.json
+++ b/package.json
@@ -10,7 +10,7 @@
"playwright": {
"chromium_revision": "724623",
"firefox_revision": "1009",
- "webkit_revision": "1080"
+ "webkit_revision": "1082"
},
"scripts": {
"unit": "node test/test.js",
diff --git a/src/webkit/wkNetworkManager.ts b/src/webkit/wkNetworkManager.ts
index f50274e3a6..ecfec31792 100644
--- a/src/webkit/wkNetworkManager.ts
+++ b/src/webkit/wkNetworkManager.ts
@@ -95,7 +95,7 @@ export class WKNetworkManager {
const frame = this._page._frameManager.frame(event.frameId);
// TODO(einbinder) this will fail if we are an XHR document request
const isNavigationRequest = event.type === 'Document';
- const documentId = isNavigationRequest ? this._session.sessionId + '::' + event.loaderId : undefined;
+ const documentId = isNavigationRequest ? event.loaderId : undefined;
const request = new InterceptableRequest(this._session, this._page._state.interceptNetwork, frame, event, redirectChain, documentId);
this._requestIdToRequest.set(event.requestId, request);
this._page._frameManager.requestStarted(request.request);
diff --git a/src/webkit/wkPage.ts b/src/webkit/wkPage.ts
index 340e83e74e..8d97009af8 100644
--- a/src/webkit/wkPage.ts
+++ b/src/webkit/wkPage.ts
@@ -195,9 +195,7 @@ export class WKPage implements PageDelegate {
frame._contextDestroyed(context);
}
}
- // Append session id to avoid cross-process loaderId clash.
- const documentId = this._session.sessionId + '::' + framePayload.loaderId;
- this._page._frameManager.frameCommittedNewDocumentNavigation(framePayload.id, framePayload.url, framePayload.name || '', documentId, initial);
+ this._page._frameManager.frameCommittedNewDocumentNavigation(framePayload.id, framePayload.url, framePayload.name || '', framePayload.loaderId, initial);
}
_onFrameNavigatedWithinDocument(frameId: string, url: string) {