mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-08-16 17:00:35 +03:00
Browser+WebDriver: Set the initial URL to about:blank from WebDriver
We already do this for headless-browser. There's no need to open any URL other than about:blank when starting a WebDriver session. We should also do this from WebDriver code, rather than in special logic in Browser's main.cpp.
This commit is contained in:
parent
93ffa77370
commit
3e2449d1fe
Notes:
sideshowbarker
2024-07-17 07:09:53 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/3e2449d1fe Pull-request: https://github.com/SerenityOS/serenity/pull/20438 Reviewed-by: https://github.com/AtkinsSJ
@ -36,6 +36,7 @@ static ErrorOr<pid_t> launch_browser(DeprecatedString const& socket_path)
|
||||
Array {
|
||||
"--webdriver-content-path",
|
||||
socket_path.characters(),
|
||||
"about:blank",
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -114,9 +114,6 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
TRY(Desktop::Launcher::add_allowed_url(URL::create_with_file_scheme(Core::StandardPaths::downloads_directory())));
|
||||
TRY(Desktop::Launcher::seal_allowlist());
|
||||
|
||||
if (!Browser::g_webdriver_content_ipc_path.is_empty())
|
||||
specified_urls.empend("about:blank");
|
||||
|
||||
TRY(Core::System::unveil("/tmp/session/%sid/portal/filesystemaccess", "rw"));
|
||||
TRY(Core::System::unveil("/tmp/session/%sid/portal/filesystemaccess", "rw"));
|
||||
TRY(Core::System::unveil("/tmp/session/%sid/portal/image", "rw"));
|
||||
|
@ -20,6 +20,7 @@ static ErrorOr<pid_t> launch_browser(DeprecatedString const& socket_path)
|
||||
Array {
|
||||
"--webdriver-content-path",
|
||||
socket_path.characters(),
|
||||
"about:blank",
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user