mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-28 15:40:04 +00:00
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:
@@ -642,7 +642,7 @@ fn getLayoutMetrics(cmd: anytype) !void {
|
||||
|
||||
const testing = @import("../testing.zig");
|
||||
test "cdp.page: getFrameTree" {
|
||||
var ctx = testing.context();
|
||||
var ctx = try testing.context();
|
||||
defer ctx.deinit();
|
||||
|
||||
{
|
||||
@@ -712,7 +712,7 @@ test "cdp.page: captureScreenshot" {
|
||||
const filter: LogFilter = .init(&.{.not_implemented});
|
||||
defer filter.deinit();
|
||||
|
||||
var ctx = testing.context();
|
||||
var ctx = try testing.context();
|
||||
defer ctx.deinit();
|
||||
{
|
||||
try ctx.processMessage(.{ .id = 10, .method = "Page.captureScreenshot", .params = .{ .format = "jpg" } });
|
||||
@@ -728,7 +728,7 @@ test "cdp.page: captureScreenshot" {
|
||||
}
|
||||
|
||||
test "cdp.page: getLayoutMetrics" {
|
||||
var ctx = testing.context();
|
||||
var ctx = try testing.context();
|
||||
defer ctx.deinit();
|
||||
|
||||
_ = try ctx.loadBrowserContext(.{ .id = "BID-9", .url = "hi.html", .target_id = "FID-000000000X".* });
|
||||
|
||||
Reference in New Issue
Block a user