LibWeb+WebDriver: Validate WebDriver proxy capabilities

We don't yet support a proxy configuration, but we can still validate
the capability received from the WebDriver client. We should also fail
to create a WebDriver session if a proxy configuration is present.
This commit is contained in:
Timothy Flynn 2025-02-07 13:52:41 -05:00 committed by Tim Flynn
commit d873dc0744
Notes: github-actions[bot] 2025-02-10 16:34:53 +00:00
5 changed files with 178 additions and 34 deletions

View file

@ -0,0 +1,20 @@
/*
* Copyright (c) 2025, Tim Flynn <trflynn89@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/JsonObject.h>
#include <LibWeb/WebDriver/Error.h>
namespace Web::WebDriver {
bool has_proxy_configuration();
void set_has_proxy_configuration(bool);
void reset_has_proxy_configuration();
ErrorOr<JsonObject, Error> deserialize_as_a_proxy(JsonValue const&);
}