mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-10-09 04:42:30 -04:00
cdp: test that replies echo the sessionId
This commit is contained in:
1 parent
c98afa4beb
commit
ce5f6195db
1 file changed
+10
@@ -249,6 +249,16 @@ test "cdp.browser: getVersion" {
|
||||
}, .{ .id = 32, .index = 0, .session_id = null });
|
||||
}
|
||||
|
||||
// Clients route replies by (sessionId, id): a reply must echo the sessionId of its command.
|
||||
test "cdp.browser: replies echo the sessionId" {
|
||||
var ctx = try testing.context();
|
||||
defer ctx.deinit();
|
||||
|
||||
_ = try ctx.loadBrowserContext(.{ .session_id = "SID-X" });
|
||||
try ctx.processMessage(.{ .id = 1, .method = "Browser.getVersion", .sessionId = "SID-X" });
|
||||
try ctx.expectSentResult(.{ .product = PRODUCT }, .{ .id = 1, .session_id = "SID-X" });
|
||||
}
|
||||
|
||||
test "cdp.browser: getWindowForTarget" {
|
||||
var ctx = try testing.context();
|
||||
defer ctx.deinit();
|
||||
|
||||
Reference in new issue
Block a user