Make CDP less generic.

It's still generic over the client - we need to assert messages written to and
be able to send specific commands, but it's no longer generic over Browser/
Session/Page/etc..
This commit is contained in:
Karl Seguin
2025-04-24 18:06:55 +08:00
parent 332508f563
commit 1fca035cfe
4 changed files with 18 additions and 208 deletions

View File

@@ -522,7 +522,7 @@ test "cdp.target: createTarget" {
try testing.expectEqual(true, bc.target_id != null);
try testing.expectEqual(
\\{"isDefault":true,"type":"default","frameId":"TID-1"}
, bc.session.page.?.aux_data);
, bc.session.aux_data);
try ctx.expectSentResult(.{ .targetId = bc.target_id.? }, .{ .id = 10 });
try ctx.expectSentEvent("Target.targetCreated", .{ .targetInfo = .{ .url = "about:blank", .title = "about:blank", .attached = false, .type = "page", .canAccessOpener = false, .browserContextId = "BID-9", .targetId = bc.target_id.? } }, .{});