| Index: components/app_modal/javascript_dialog_manager.cc
|
| diff --git a/components/app_modal/javascript_dialog_manager.cc b/components/app_modal/javascript_dialog_manager.cc
|
| index cec07c96d5fe325eeac4778f2b8d85f5eb95bbbc..c5a368384b597f56c031f3c1ad1c6b89f659e268 100644
|
| --- a/components/app_modal/javascript_dialog_manager.cc
|
| +++ b/components/app_modal/javascript_dialog_manager.cc
|
| @@ -248,8 +248,17 @@ bool JavaScriptDialogManager::HandleJavaScriptDialog(
|
| dialog_queue->active_dialog()->web_contents() != web_contents) {
|
| return false;
|
| }
|
| +
|
| JavaScriptAppModalDialog* dialog = static_cast<JavaScriptAppModalDialog*>(
|
| dialog_queue->active_dialog());
|
| +
|
| + if (dialog->javascript_dialog_type() ==
|
| + content::JavaScriptDialogType::JAVASCRIPT_DIALOG_TYPE_ALERT) {
|
| + // Alert dialogs only have one button: OK. Any "handling" of this dialog has
|
| + // to be a click on the OK button.
|
| + accept = true;
|
| + }
|
| +
|
| if (accept) {
|
| if (prompt_override)
|
| dialog->SetOverridePromptText(*prompt_override);
|
|
|