mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
Headless: Compile on Windows
This commit is contained in:
parent
c55ba17d66
commit
17d49a1210
2 changed files with 15 additions and 2 deletions
|
@ -45,6 +45,18 @@ private:
|
|||
Optional<Core::Process> m_process;
|
||||
};
|
||||
|
||||
#ifdef AK_OS_WINDOWS
|
||||
// FIXME: Implement Ladybird::HttpEchoServerFixture::setup on Windows
|
||||
ErrorOr<void> HttpEchoServerFixture::setup(WebView::WebContentOptions&)
|
||||
{
|
||||
VERIFY(0 && "Ladybird::HttpEchoServerFixture::setup is not implemented");
|
||||
}
|
||||
// FIXME: Implement Ladybird::HttpEchoServerFixture::teardown_impl on Windows
|
||||
void HttpEchoServerFixture::teardown_impl()
|
||||
{
|
||||
VERIFY(0 && "Ladybird::HttpEchoServerFixture::teardown_impl is not implemented");
|
||||
}
|
||||
#else
|
||||
ErrorOr<void> HttpEchoServerFixture::setup(WebView::WebContentOptions& web_content_options)
|
||||
{
|
||||
auto const script_path = LexicalPath::join(s_fixtures_path, m_script_path);
|
||||
|
@ -99,6 +111,7 @@ void HttpEchoServerFixture::teardown_impl()
|
|||
|
||||
m_process = {};
|
||||
}
|
||||
#endif
|
||||
|
||||
void Fixture::initialize_fixtures()
|
||||
{
|
||||
|
|
|
@ -183,7 +183,7 @@ void run_dump_test(HeadlessWebView& view, Test& test, URL::URL const& url, int t
|
|||
return TestResult::Pass;
|
||||
}
|
||||
|
||||
auto const color_output = isatty(STDOUT_FILENO) ? Diff::ColorOutput::Yes : Diff::ColorOutput::No;
|
||||
auto const color_output = TRY(Core::System::isatty(STDOUT_FILENO)) ? Diff::ColorOutput::Yes : Diff::ColorOutput::No;
|
||||
|
||||
if (color_output == Diff::ColorOutput::Yes)
|
||||
outln("\n\033[33;1mTest failed\033[0m: {}", url);
|
||||
|
@ -558,7 +558,7 @@ ErrorOr<void> run_tests(Core::AnonymousBuffer const& theme, Web::DevicePixelSize
|
|||
bool all_tests_ok = true;
|
||||
|
||||
// Keep clearing and reusing the same line if stdout is a TTY.
|
||||
bool log_on_one_line = app.verbosity < Application::VERBOSITY_LEVEL_LOG_TEST_DURATION && isatty(STDOUT_FILENO) == 1;
|
||||
bool log_on_one_line = app.verbosity < Application::VERBOSITY_LEVEL_LOG_TEST_DURATION && TRY(Core::System::isatty(STDOUT_FILENO));
|
||||
outln("Running {} tests...", tests.size());
|
||||
|
||||
auto all_tests_complete = Core::Promise<Empty>::construct();
|
||||
|
|
Loading…
Add table
Reference in a new issue