Lightpanda: the headless browser designed for AI and automation
Merge pull request #3116 from lightpanda-io/nikneym/adblocker-init
Pierre Tachoire33867c72759c
diff --cc src/network/HttpClient.zigindex 2e089b278,c40601081..963a7d7f5--- a/src/network/HttpClient.zig+++ b/src/network/HttpClient.zig@@@ -3438,11 -3408,12 +3460,15 @@@ fn initTestClient(client: *Client, poolclient.cache = null;client.serve_mode = false;client.obey_robots = false;- client.robots = .{ .allocator = testing.allocator, .network = undefined };+ client.robots = .{+ .network = undefined,+ .single_flight = .init(testing.allocator),+ };client.url_blocklist = null;+ // isUrlBlocked reaches through here for the adblocker; tests that want+ // one assign it to `client.network` after this returns.+ test_network.adblocker = null;+ client.network = &test_network;}test "HttpClient: setBlockedUrls owns, replaces, and clears patterns" {