Switch XHR to new http client

get puppeteer/cdp.js working again

make test are all passing
This commit is contained in:
Karl Seguin
2025-07-30 17:13:23 +08:00
parent b0fe5d60ab
commit 54ab1326e5
12 changed files with 330 additions and 386 deletions

View File

@@ -409,6 +409,10 @@ pub const JsRunner = struct {
const html_doc = try parser.documentHTMLParseFromStr(opts.html);
try page.setDocument(html_doc);
// after the page is considered loaded, page.wait can exit early if
// there's no IO/timeouts. So setting this speeds up our tests
page.loaded = true;
return .{
.app = app,
.page = page,
@@ -441,7 +445,7 @@ pub const JsRunner = struct {
}
return err;
};
try self.page.loop.run(std.time.ns_per_ms * 200);
try self.page.wait(1);
@import("root").js_runner_duration += std.time.Instant.since(try std.time.Instant.now(), start);
if (case.@"1") |expected| {