diff options
author | martinfalisse <martinmotteditfalisse@gmail.com> | 2023-05-06 12:46:14 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-05-08 14:47:52 +0200 |
commit | c719a542c5a51016124040b7c092cba946b538fd (patch) | |
tree | 7c8f78702f94b722221b3055280858cde33720a4 /Ladybird/WebContent | |
parent | af26b76e0accf6eb7ef673b02501ba2c235a991b (diff) | |
download | serenity-c719a542c5a51016124040b7c092cba946b538fd.zip |
LibWeb: Add `--layout-test-mode` flag to HeadlessBrowser
The `layout-test-mode` flag changes the font to be SerenitySans as this
is the font used for layout tests for cross-platform compatibility of
tests.
Diffstat (limited to 'Ladybird/WebContent')
-rw-r--r-- | Ladybird/WebContent/main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Ladybird/WebContent/main.cpp b/Ladybird/WebContent/main.cpp index f0a044cc20..6ab5eec969 100644 --- a/Ladybird/WebContent/main.cpp +++ b/Ladybird/WebContent/main.cpp @@ -63,14 +63,16 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) Web::FrameLoader::set_default_favicon_path(DeprecatedString::formatted("{}/res/icons/16x16/app-browser.png", s_serenity_resource_root)); int webcontent_fd_passing_socket { -1 }; + bool is_layout_test_mode = false; Core::ArgsParser args_parser; args_parser.add_option(webcontent_fd_passing_socket, "File descriptor of the passing socket for the WebContent connection", "webcontent-fd-passing-socket", 'c', "webcontent_fd_passing_socket"); + args_parser.add_option(is_layout_test_mode, "Is layout test mode", "layout-test-mode", 0); args_parser.parse(arguments); VERIFY(webcontent_fd_passing_socket >= 0); - Web::Platform::FontPlugin::install(*new Ladybird::FontPluginQt); + Web::Platform::FontPlugin::install(*new Ladybird::FontPluginQt(is_layout_test_mode)); Web::FrameLoader::set_error_page_url(DeprecatedString::formatted("file://{}/res/html/error.html", s_serenity_resource_root)); |