mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:07:34 +00:00
WebContent: Allow pop-ups when WebDriver is connected
Currently we have `m_should_block_pop_ups` set to true by default which means `choose_a_browsing_context` will early return if new top-level browsing context is requested and write `Pop-up blocked!` in console. It is good but when WebDriver is connected we want it to be able to actually open a new window if one is requested.
This commit is contained in:
parent
126fa7df14
commit
bb98ae08b8
1 changed files with 3 additions and 0 deletions
|
@ -324,6 +324,9 @@ ErrorOr<NonnullRefPtr<WebDriverConnection>> WebDriverConnection::connect(Web::Pa
|
|||
dbgln_if(WEBDRIVER_DEBUG, "Trying to connect to {}", webdriver_ipc_path);
|
||||
auto socket = TRY(Core::LocalSocket::connect(webdriver_ipc_path));
|
||||
|
||||
// Allow pop-ups, or otherwise /window/new won't be able to open a new tab.
|
||||
page_client.page().set_should_block_pop_ups(false);
|
||||
|
||||
dbgln_if(WEBDRIVER_DEBUG, "Connected to WebDriver");
|
||||
return adopt_nonnull_ref_or_enomem(new (nothrow) WebDriverConnection(move(socket), page_client));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue