Quick-check sameness in Node.isEqualNode

Exclusively use the not_implemented log filter.
This commit is contained in:
Karl Seguin
2025-12-26 09:57:33 +08:00
parent 0fff379ee0
commit 05cb5221d4
9 changed files with 18 additions and 20 deletions

View File

@@ -76,7 +76,7 @@ fn getDocument(cmd: anytype) !void {
const params = try cmd.params(Params) orelse Params{};
if (params.pierce) {
log.warn(.cdp, "not implemented", .{ .feature = "DOM.getDocument: Not implemented pierce parameter" });
log.warn(.not_implemented, "DOM.getDocument", .{ .param = "pierce" });
}
const bc = cmd.browser_context orelse return error.BrowserContextNotLoaded;
@@ -315,7 +315,7 @@ fn describeNode(cmd: anytype) !void {
})) orelse return error.InvalidParams;
if (params.pierce) {
log.warn(.cdp, "not implemented", .{ .feature = "DOM.describeNode: Not implemented pierce parameter" });
log.warn(.not_implemented, "DOM.describeNode", .{ .param = "pierce" });
}
const bc = cmd.browser_context orelse return error.BrowserContextNotLoaded;
@@ -497,7 +497,7 @@ fn getOuterHTML(cmd: anytype) !void {
})) orelse return error.InvalidParams;
if (params.includeShadowDOM) {
log.warn(.cdp, "not implemented", .{ .feature = "DOM.getOuterHTML: Not implemented includeShadowDOM parameter" });
log.warn(.not_implemented, "DOM.getOuterHTML", .{ .param = "includeShadowDOM" });
}
const bc = cmd.browser_context orelse return error.BrowserContextNotLoaded;
const page = bc.session.currentPage() orelse return error.PageNotLoaded;

View File

@@ -142,7 +142,7 @@ fn disable(cmd: anytype) !void {
fn enable(cmd: anytype) !void {
const params = (try cmd.params(EnableParam)) orelse EnableParam{};
if (!arePatternsSupported(params.patterns)) {
log.warn(.cdp, "not implemented", .{ .feature = "Fetch.enable advanced patterns are not" });
log.warn(.not_implemented, "Fetch.enable", .{ .params = "pattern" });
return cmd.sendResult(null, .{});
}
@@ -331,7 +331,7 @@ fn fulfillRequest(cmd: anytype) !void {
})) orelse return error.InvalidParams;
if (params.binaryResponseHeaders != null) {
log.warn(.cdp, "not implemented", .{ .feature = "Fetch.fulfillRequest binaryResponseHeade" });
log.warn(.not_implemented, "Fetch.fulfillRequest", .{ .param = "binaryResponseHeaders" });
return error.NotImplemented;
}

View File

@@ -178,7 +178,7 @@ fn createIsolatedWorld(cmd: anytype) !void {
grantUniveralAccess: bool = false,
})) orelse return error.InvalidParams;
if (!params.grantUniveralAccess) {
log.warn(.cdp, "not implemented", .{ .feature = "grantUniveralAccess == false is not yet implemented" });
log.warn(.not_implemented, "Page.createIsolatedWorld", .{ .param = "grantUniveralAccess" });
// When grantUniveralAccess == false and the client attempts to resolve
// or otherwise access a DOM or other JS Object from another context that should fail.
}

View File

@@ -101,7 +101,7 @@ fn createBrowserContext(cmd: anytype) !void {
});
if (params) |p| {
if (p.disposeOnDetach or p.proxyBypassList != null or p.originsWithUniversalNetworkAccess != null) {
log.warn(.cdp, "not implemented", .{ .feature = "Target.createBrowserContext: Not implemented param set" });
log.warn(.not_implemented, "Target.createBrowserContext", .{ .disposeOnDetach = p.disposeOnDetach, .has_proxyBypassList = p.proxyBypassList != null, .has_originsWithUniversalNetworkAccess = p.originsWithUniversalNetworkAccess != null });
}
}