Skip to content

Commit 5207bdf

Browse files
authored
Merge pull request #608 from lightpanda-io/wpt-opts-url
wpt: use local url for wpt tests
2 parents 690d423 + 95ee78b commit 5207bdf

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/main_wpt.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ fn run(arena: Allocator, test_file: []const u8, loader: *FileLoader, err_out: *?
108108
const dirname = std.fs.path.dirname(test_file) orelse "";
109109

110110
var runner = try @import("testing.zig").jsRunner(arena, .{
111+
.url = "http://127.0.0.1",
111112
.html = html,
112113
});
113114
defer runner.deinit();

src/testing.zig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ pub const JsRunner = struct {
401401
self.env = try Env.init(arena, .{});
402402
errdefer self.env.deinit();
403403

404-
self.url = try URL.parse("https://lightpanda.io/opensource-browser/", null);
404+
self.url = try URL.parse(opts.url, null);
405405

406406
self.renderer = Renderer.init(arena);
407407
self.cookie_jar = storage.CookieJar.init(arena);
@@ -500,6 +500,7 @@ pub const JsRunner = struct {
500500
};
501501

502502
const RunnerOpts = struct {
503+
url: []const u8 = "https://lightpanda.io/opensource-browser/",
503504
html: []const u8 =
504505
\\ <div id="content">
505506
\\ <a id="link" href="foo" class="ok">OK</a>

0 commit comments

Comments
 (0)