mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:47:35 +00:00
LibWebView+WebContent: Begin handling open user dialogs for WebDriver
The way in which dialogs should be handled is configurable by the driver capabilities object, which we don't support yet. So this implements just the default mode to dismiss the dialog and return an error if there is one open. In the OOPWV, this means we need to refer to the dialog after it has been open, so we now hold a pointer to whatever dialog is open.
This commit is contained in:
parent
5b31a3dbc7
commit
0e94904034
10 changed files with 165 additions and 36 deletions
|
@ -305,6 +305,21 @@ void PageHost::prompt_closed(String response)
|
|||
}
|
||||
}
|
||||
|
||||
void PageHost::dismiss_dialog()
|
||||
{
|
||||
switch (m_pending_dialog) {
|
||||
case PendingDialog::None:
|
||||
break;
|
||||
case PendingDialog::Alert:
|
||||
m_client.async_did_request_accept_dialog();
|
||||
break;
|
||||
case PendingDialog::Confirm:
|
||||
case PendingDialog::Prompt:
|
||||
m_client.async_did_request_dismiss_dialog();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void PageHost::page_did_change_favicon(Gfx::Bitmap const& favicon)
|
||||
{
|
||||
m_client.async_did_change_favicon(favicon.to_shareable_bitmap());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue