File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -274,13 +274,13 @@ test "cdp.page: getFrameTree" {
274274 try ctx .expectSentError (-31998 , "BrowserContextNotLoaded" , .{ .id = 10 });
275275 }
276276
277- const bc = try ctx .loadBrowserContext (.{ .id = "BID-9" });
277+ const bc = try ctx .loadBrowserContext (.{ .id = "BID-9" , . target_id = "TID-3" });
278278 {
279279 try ctx .processMessage (.{ .id = 11 , .method = "Page.getFrameTree" });
280280 try ctx .expectSentResult (.{
281281 .frameTree = .{
282282 .frame = .{
283- .id = bc . frame_id ,
283+ .id = "TID-3" ,
284284 .loaderId = bc .loader_id ,
285285 .url = bc .url ,
286286 .domainAndRegistry = "" ,
Original file line number Diff line number Diff line change @@ -147,6 +147,7 @@ const TestContext = struct {
147147
148148 const BrowserContextOpts = struct {
149149 id : ? []const u8 = null ,
150+ target_id : ? []const u8 = null ,
150151 session_id : ? []const u8 = null ,
151152 };
152153 pub fn loadBrowserContext (self : * TestContext , opts : BrowserContextOpts ) ! * main .BrowserContext (TestCDP ) {
@@ -163,6 +164,10 @@ const TestContext = struct {
163164 bc .id = id ;
164165 }
165166
167+ if (opts .target_id ) | tid | {
168+ bc .target_id = tid ;
169+ }
170+
166171 if (opts .session_id ) | sid | {
167172 bc .session_id = sid ;
168173 }
You can’t perform that action at this time.
0 commit comments