Removes CDPT (generic CDP)

CDPT used to be a generic so that we could inject Browser, Session, Page and
Client. At some point, it [thankfully] became a generic only to inject Client.

This commit removes the generic and bakes the *Server.Client instance in CDP.
It uses a socketpair for testing.

BrowserContext is still generic, but that's generic for a very different reason
and, while I'd like to remove that generic too, it belongs in a different PR.
This commit is contained in:
Karl Seguin
2026-03-25 17:43:30 +08:00
parent d517488158
commit 0dd0495ab8
14 changed files with 456 additions and 396 deletions

View File

@@ -112,7 +112,7 @@ fn resetPermissions(cmd: anytype) !void {
const testing = @import("../testing.zig");
test "cdp.browser: getVersion" {
var ctx = testing.context();
var ctx = try testing.context();
defer ctx.deinit();
try ctx.processMessage(.{
@@ -131,7 +131,7 @@ test "cdp.browser: getVersion" {
}
test "cdp.browser: getWindowForTarget" {
var ctx = testing.context();
var ctx = try testing.context();
defer ctx.deinit();
try ctx.processMessage(.{