mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 15:13:28 +00:00
Switch XHR to new http client
get puppeteer/cdp.js working again make test are all passing
This commit is contained in:
@@ -155,6 +155,7 @@ fn navigate(cmd: anytype) !void {
|
||||
.reason = .address_bar,
|
||||
.cdp_id = cmd.input.id,
|
||||
});
|
||||
try page.wait(5);
|
||||
}
|
||||
|
||||
pub fn pageNavigate(arena: Allocator, bc: anytype, event: *const Notification.PageNavigate) !void {
|
||||
@@ -189,13 +190,13 @@ pub fn pageNavigate(arena: Allocator, bc: anytype, event: *const Notification.Pa
|
||||
.frameId = target_id,
|
||||
.delay = 0,
|
||||
.reason = reason,
|
||||
.url = event.url.raw,
|
||||
.url = event.url,
|
||||
}, .{ .session_id = session_id });
|
||||
|
||||
try cdp.sendEvent("Page.frameRequestedNavigation", .{
|
||||
.frameId = target_id,
|
||||
.reason = reason,
|
||||
.url = event.url.raw,
|
||||
.url = event.url,
|
||||
.disposition = "currentTab",
|
||||
}, .{ .session_id = session_id });
|
||||
}
|
||||
@@ -203,7 +204,7 @@ pub fn pageNavigate(arena: Allocator, bc: anytype, event: *const Notification.Pa
|
||||
// frameStartedNavigating event
|
||||
try cdp.sendEvent("Page.frameStartedNavigating", .{
|
||||
.frameId = target_id,
|
||||
.url = event.url.raw,
|
||||
.url = event.url,
|
||||
.loaderId = loader_id,
|
||||
.navigationType = "differentDocument",
|
||||
}, .{ .session_id = session_id });
|
||||
@@ -306,7 +307,7 @@ pub fn pageNavigated(bc: anytype, event: *const Notification.PageNavigated) !voi
|
||||
.type = "Navigation",
|
||||
.frame = Frame{
|
||||
.id = target_id,
|
||||
.url = event.url.raw,
|
||||
.url = event.url,
|
||||
.loaderId = bc.loader_id,
|
||||
.securityOrigin = bc.security_origin,
|
||||
.secureContextType = bc.secure_context_type,
|
||||
|
||||
Reference in New Issue
Block a user