mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:27:35 +00:00
LibWeb+Ladybird+Userland: Port window.[alert,confirm,prompt] to String
LibGUI and WebDriver (read: JSON) API boundaries use DeprecatedString, so that is as far as these changes can reach. The one change which isn't just a DeprecatedString to String replacement is handling the "null" prompt response. We previously checked for the null DeprecatedString, whereas we now represent this as an empty Optional<String>.
This commit is contained in:
parent
b4d3fea002
commit
97536e4684
18 changed files with 85 additions and 85 deletions
|
@ -1640,7 +1640,7 @@ Messages::WebDriverClient::GetAlertTextResponse WebDriverConnection::get_alert_t
|
|||
|
||||
// 4. Return success with data message.
|
||||
if (message.has_value())
|
||||
return *message;
|
||||
return message->to_deprecated_string();
|
||||
return JsonValue {};
|
||||
}
|
||||
|
||||
|
@ -1679,7 +1679,7 @@ Messages::WebDriverClient::SendAlertTextResponse WebDriverConnection::send_alert
|
|||
}
|
||||
|
||||
// 6. Perform user agent dependent steps to set the value of current user prompt’s text field to text.
|
||||
m_page_client.page_did_request_set_prompt_text(move(text));
|
||||
m_page_client.page_did_request_set_prompt_text(TRY(String::from_deprecated_string(text)));
|
||||
|
||||
// 7. Return success with data null.
|
||||
return JsonValue {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue