1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:27:35 +00:00

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.
This commit is contained in:
martinfalisse 2023-05-06 12:46:14 +02:00 committed by Andreas Kling
parent af26b76e0a
commit c719a542c5
6 changed files with 27 additions and 8 deletions

View file

@ -24,6 +24,11 @@ enum class EnableCallgrindProfiling {
Yes
};
enum class IsLayoutTestMode {
No,
Yes
};
class ViewImplementation {
public:
virtual ~ViewImplementation() { }
@ -131,7 +136,7 @@ protected:
virtual void create_client(EnableCallgrindProfiling = EnableCallgrindProfiling::No) {};
#if !defined(AK_OS_SERENITY)
ErrorOr<NonnullRefPtr<WebView::WebContentClient>> launch_web_content_process(ReadonlySpan<String> candidate_web_content_paths, EnableCallgrindProfiling = EnableCallgrindProfiling::No);
ErrorOr<NonnullRefPtr<WebView::WebContentClient>> launch_web_content_process(ReadonlySpan<String> candidate_web_content_paths, EnableCallgrindProfiling = EnableCallgrindProfiling::No, IsLayoutTestMode = IsLayoutTestMode::No);
#endif
struct SharedBitmap {