Merge pull request #608 from lightpanda-io/wpt-opts-url

wpt: use local url for wpt tests
This commit is contained in:
Karl Seguin
2025-05-07 16:07:24 +08:00
committed by GitHub
2 changed files with 3 additions and 1 deletions

View File

@@ -108,6 +108,7 @@ fn run(arena: Allocator, test_file: []const u8, loader: *FileLoader, err_out: *?
const dirname = std.fs.path.dirname(test_file) orelse "";
var runner = try @import("testing.zig").jsRunner(arena, .{
.url = "http://127.0.0.1",
.html = html,
});
defer runner.deinit();

View File

@@ -401,7 +401,7 @@ pub const JsRunner = struct {
self.env = try Env.init(arena, .{});
errdefer self.env.deinit();
self.url = try URL.parse("https://lightpanda.io/opensource-browser/", null);
self.url = try URL.parse(opts.url, null);
self.renderer = Renderer.init(arena);
self.cookie_jar = storage.CookieJar.init(arena);
@@ -500,6 +500,7 @@ pub const JsRunner = struct {
};
const RunnerOpts = struct {
url: []const u8 = "https://lightpanda.io/opensource-browser/",
html: []const u8 =
\\ <div id="content">
\\ <a id="link" href="foo" class="ok">OK</a>