fix(browser): scope workers and binary frame sizes

This commit is contained in:
morluto
2026-07-14 05:24:51 +00:00
parent 8481be9c97
commit dfc06cf0ad
4 changed files with 50 additions and 4 deletions
+11 -1
View File
@@ -50,7 +50,11 @@ describe("CdpBrowserProvider", () => {
});
it("captures bounded passive evidence without retaining sensitive values", async () => {
const browser = await startFakeCdpBrowser({ foreignSessionEvents: true });
const browser = await startFakeCdpBrowser({
binaryWebSocketEvent: true,
foreignSessionEvents: true,
unrelatedWorker: true,
});
browsers.push(browser);
const provider = new CdpBrowserProvider();
const result = await provider.inspectPage(
@@ -85,6 +89,12 @@ describe("CdpBrowserProvider", () => {
opcode: 1,
payload_bytes: Buffer.byteLength("websocket-secret"),
},
{
request_id: "websocket-1",
direction: "received",
opcode: 2,
payload_bytes: 3,
},
]);
expect(result.value.console.events[0]?.argument_types).toEqual(["string"]);
expect(result.value.workers).toHaveLength(1);