mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-09-15 23:37:42 -04:00
fix test running
This commit is contained in:
7 files changed
+25
-3
No files matched your search
@@ -55,6 +55,12 @@ pub const Owner = union(enum) {
|
||||
};
|
||||
}
|
||||
|
||||
pub fn origin(self: Owner) ?[]const u8 {
|
||||
return switch (self) {
|
||||
inline else => |g| g.origin,
|
||||
};
|
||||
}
|
||||
|
||||
pub fn jsContext(self: Owner) *js.Context {
|
||||
return switch (self) {
|
||||
inline else => |g| g.js,
|
||||
|
||||
@@ -512,8 +512,6 @@ fn fetchThenResume(self: *CorsGate, transfer: *Transfer) !void {
|
||||
.document_frame_id = transfer.req.document_frame_id,
|
||||
.loader_id = transfer.req.loader_id,
|
||||
.notification = transfer.req.notification,
|
||||
.cookie_jar = null,
|
||||
.cookie_origin = transfer.req.cookie_origin,
|
||||
.origin = transfer.req.origin,
|
||||
.credentials_mode = .omit,
|
||||
.request_mode = .no_cors,
|
||||
|
||||
@@ -4228,6 +4228,7 @@ fn testTransfer(arena: *lp.Arena) Transfer {
|
||||
.req = .{
|
||||
.method = .GET,
|
||||
.url = "http://example.com/",
|
||||
.origin = null,
|
||||
.credentials_mode = .omit,
|
||||
.request_mode = .no_cors,
|
||||
.resource_type = .document,
|
||||
@@ -4458,6 +4459,7 @@ test "HttpClient: fulfillIntercepted survives a done_callback that tears down th
|
||||
.req = .{
|
||||
.method = .GET,
|
||||
.url = "http://example.com/",
|
||||
.origin = null,
|
||||
.credentials_mode = .omit,
|
||||
.request_mode = .no_cors,
|
||||
.resource_type = .document,
|
||||
@@ -4540,6 +4542,7 @@ test "HttpClient: kill during done_callback does not also fire shutdown_callback
|
||||
.req = .{
|
||||
.method = .GET,
|
||||
.url = "http://example.com/",
|
||||
.origin = null,
|
||||
.credentials_mode = .omit,
|
||||
.request_mode = .no_cors,
|
||||
.resource_type = .xhr,
|
||||
@@ -4623,6 +4626,7 @@ test "HttpClient: kill during a non-terminal callback defers shutdown_callback"
|
||||
.req = .{
|
||||
.method = .GET,
|
||||
.url = "http://example.com/",
|
||||
.origin = null,
|
||||
.credentials_mode = .omit,
|
||||
.request_mode = .no_cors,
|
||||
.resource_type = .xhr,
|
||||
@@ -4681,6 +4685,7 @@ test "HttpClient: aborting a robots-parked transfer unlinks it from the gate" {
|
||||
.req = .{
|
||||
.method = .GET,
|
||||
.url = "http://example.com/",
|
||||
.origin = null,
|
||||
.credentials_mode = .omit,
|
||||
.request_mode = .no_cors,
|
||||
.resource_type = .document,
|
||||
@@ -4745,6 +4750,7 @@ test "HttpClient: fulfillIntercepted follows a 3xx redirect" {
|
||||
.req = .{
|
||||
.method = .POST,
|
||||
.url = "http://example.com/start",
|
||||
.origin = null,
|
||||
.body = "payload",
|
||||
.credentials_mode = .omit,
|
||||
.request_mode = .no_cors,
|
||||
@@ -4786,6 +4792,7 @@ test "HttpClient: fulfillIntercepted follows a 3xx redirect" {
|
||||
.req = .{
|
||||
.method = .POST,
|
||||
.url = "http://example.com/start",
|
||||
.origin = null,
|
||||
.body = "payload",
|
||||
.credentials_mode = .omit,
|
||||
.request_mode = .no_cors,
|
||||
@@ -4852,6 +4859,7 @@ test "HttpClient: fulfillIntercepted delivers a 3xx without a Location as the re
|
||||
.req = .{
|
||||
.method = .GET,
|
||||
.url = "http://example.com/",
|
||||
.origin = null,
|
||||
.credentials_mode = .omit,
|
||||
.request_mode = .no_cors,
|
||||
.resource_type = .document,
|
||||
@@ -4917,7 +4925,7 @@ test "HttpClient: abortParked survives an error_callback that tears down the own
|
||||
.req = .{
|
||||
.method = .GET,
|
||||
.url = "http://example.com/",
|
||||
.origin = "",
|
||||
.origin = null,
|
||||
.credentials_mode = .omit,
|
||||
.request_mode = .no_cors,
|
||||
.resource_type = .document,
|
||||
@@ -4993,6 +5001,7 @@ test "HttpClient: abort survives an error_callback that tears down the owner" {
|
||||
.req = .{
|
||||
.method = .GET,
|
||||
.url = "http://example.com/",
|
||||
.origin = null,
|
||||
.credentials_mode = .omit,
|
||||
.request_mode = .no_cors,
|
||||
.resource_type = .xhr,
|
||||
@@ -5027,6 +5036,7 @@ test "HttpClient: abort survives an error_callback that tears down the owner" {
|
||||
.req = .{
|
||||
.method = .GET,
|
||||
.url = "http://example.com/",
|
||||
.origin = null,
|
||||
.credentials_mode = .omit,
|
||||
.request_mode = .no_cors,
|
||||
.resource_type = .xhr,
|
||||
@@ -5088,6 +5098,7 @@ test "HttpClient: throttled navigations wait for their per-host slot" {
|
||||
.req = .{
|
||||
.method = .GET,
|
||||
.url = url,
|
||||
.origin = null,
|
||||
.credentials_mode = .omit,
|
||||
.request_mode = .no_cors,
|
||||
.resource_type = .document,
|
||||
|
||||
@@ -106,6 +106,7 @@ fn makeTestTransfer(arena: *lp.Arena, client: *HttpClient, id: u32) !*Transfer {
|
||||
.req = .{
|
||||
.method = .GET,
|
||||
.url = "http://example.com/",
|
||||
.origin = null,
|
||||
.credentials_mode = .omit,
|
||||
.request_mode = .no_cors,
|
||||
.resource_type = .document,
|
||||
|
||||
@@ -244,6 +244,7 @@ test "signRequest: adds headers with correct names" {
|
||||
.req = .{
|
||||
.method = .GET,
|
||||
.url = "https://example.com/",
|
||||
.origin = null,
|
||||
.credentials_mode = .omit,
|
||||
.request_mode = .no_cors,
|
||||
.resource_type = .document,
|
||||
|
||||
@@ -1516,6 +1516,7 @@ test "cdp: syncRequest short-circuits after disconnect" {
|
||||
const transfer = try client.newRequest(.{
|
||||
.method = .GET,
|
||||
.url = "http://127.0.0.1:9582/",
|
||||
.origin = null,
|
||||
.credentials_mode = .omit,
|
||||
.request_mode = .no_cors,
|
||||
.resource_type = .fetch,
|
||||
|
||||
@@ -1177,6 +1177,7 @@ test "cdp.Network: setBlockedURLs blocks requests with inspector reason" {
|
||||
.loader_id = 1,
|
||||
.method = .GET,
|
||||
.url = "https://blocked.test/script.js",
|
||||
.origin = bc.security_origin,
|
||||
.credentials_mode = .omit,
|
||||
.request_mode = .no_cors,
|
||||
.resource_type = .script,
|
||||
@@ -1203,6 +1204,7 @@ test "cdp.Network: setBlockedURLs blocks requests with inspector reason" {
|
||||
.loader_id = 1,
|
||||
.method = .GET,
|
||||
.url = "http://127.0.0.1:9582/redirect-no-fragment",
|
||||
.origin = bc.security_origin,
|
||||
.credentials_mode = .omit,
|
||||
.request_mode = .no_cors,
|
||||
.resource_type = .script,
|
||||
@@ -1243,6 +1245,7 @@ test "cdp.Network: POST body exposed as postData" {
|
||||
.loader_id = 1,
|
||||
.method = .POST,
|
||||
.url = "http://127.0.0.1:9582/echo_body",
|
||||
.origin = bc.security_origin,
|
||||
.body = body,
|
||||
.credentials_mode = .omit,
|
||||
.request_mode = .no_cors,
|
||||
@@ -1510,6 +1513,7 @@ test "cdp.Network: redirect hop precedes Fetch pause and carries redirectRespons
|
||||
.loader_id = 7,
|
||||
.method = .GET,
|
||||
.url = start_url,
|
||||
.origin = bc.security_origin,
|
||||
.credentials_mode = .omit,
|
||||
.request_mode = .no_cors,
|
||||
.resource_type = .script,
|
||||
|
||||
Reference in new issue
Block a user