LibWebView+UI: Read and set echo server port in HttpEchoServerFixture

This commit adds a "echo_server_port" property to `WebContentOptions`.

Additionally, it makes `Application::web_content_options()` return a
mutable reference instead of a const reference so that we can set the
port value from the fixture.
This commit is contained in:
rmg-x 2024-12-02 19:33:26 -06:00 committed by Andrew Kaster
commit ece611718d
Notes: github-actions[bot] 2024-12-06 00:09:27 +00:00
5 changed files with 40 additions and 19 deletions

View file

@ -93,10 +93,11 @@ ErrorOr<void> Application::launch_test_fixtures()
// FIXME: Add option to only run specific fixtures from command line by name
// And an option to not run any fixtures at all
for (auto& fixture : Fixture::all()) {
if (auto result = fixture->setup(); result.is_error())
for (auto const& fixture : Fixture::all()) {
if (auto result = fixture->setup(web_content_options()); result.is_error())
return result;
}
return {};
}