mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:48:11 +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
|
@ -158,6 +158,8 @@ private:
|
|||
virtual void notify_server_did_request_alert(Badge<WebContentClient>, String const& message) override;
|
||||
virtual void notify_server_did_request_confirm(Badge<WebContentClient>, String const& message) override;
|
||||
virtual void notify_server_did_request_prompt(Badge<WebContentClient>, String const& message, String const& default_) override;
|
||||
virtual void notify_server_did_request_accept_dialog(Badge<WebContentClient>) override;
|
||||
virtual void notify_server_did_request_dismiss_dialog(Badge<WebContentClient>) override;
|
||||
virtual void notify_server_did_get_source(const AK::URL& url, String const& source) override;
|
||||
virtual void notify_server_did_get_dom_tree(String const& dom_tree) override;
|
||||
virtual void notify_server_did_get_dom_node_properties(i32 node_id, String const& specified_style, String const& computed_style, String const& custom_properties, String const& node_box_sizing) override;
|
||||
|
@ -204,6 +206,7 @@ private:
|
|||
} m_client_state;
|
||||
|
||||
RefPtr<Gfx::Bitmap> m_backup_bitmap;
|
||||
RefPtr<GUI::Dialog> m_dialog;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue