cdp: move LP.getMarkdown test to lp domain

This commit is contained in:
Adrià Arrufat
2026-03-03 16:39:31 +09:00
parent cc93180d57
commit c9121a03d2
2 changed files with 17 additions and 16 deletions

View File

@@ -57,3 +57,20 @@ fn getMarkdown(cmd: anytype) !void {
.markdown = aw.written(),
}, .{});
}
const testing = @import("../testing.zig");
test "cdp.lp: getMarkdown" {
var ctx = testing.context();
defer ctx.deinit();
const bc = try ctx.loadBrowserContext(.{});
_ = try bc.session.createPage();
try ctx.processMessage(.{
.id = 1,
.method = "LP.getMarkdown",
});
const result = ctx.client.?.sent.items[0].object.get("result").?.object;
try testing.expect(result.get("markdown") != null);
}