LibWebView+WebContent: Allow setting the default time zone

This is used by tests to set the default time zone to UTC.

This is because certain tests create JavaScript Date objects, which are
in the current timezone.
This commit is contained in:
Luke Wilde 2025-10-15 13:17:37 +01:00 committed by Jelle Raaijmakers
parent d0bfb85c22
commit 4ede2cdf18
Notes: github-actions[bot] 2025-10-23 12:44:09 +00:00
7 changed files with 28 additions and 2 deletions

View file

@ -128,6 +128,11 @@ static ErrorOr<NonnullRefPtr<WebView::WebContentClient>> launch_web_content_proc
arguments.append(ByteString::number(maybe_echo_server_port.value()));
}
if (web_content_options.default_time_zone.has_value()) {
arguments.append("--default-time-zone");
arguments.append(web_content_options.default_time_zone.value());
}
if (auto server = mach_server_name(); server.has_value()) {
arguments.append("--mach-server-name"sv);
arguments.append(server.value());