Index: chrome/test/chromedriver/chrome/javascript_dialog_manager.cc |
diff --git a/chrome/test/chromedriver/chrome/javascript_dialog_manager.cc b/chrome/test/chromedriver/chrome/javascript_dialog_manager.cc |
index f95d5179f67a746f68054cf7e8cfd36b7a4b045e..7eff15d0a8ccb84c2f09114907a8bd439ce29df6 100644 |
--- a/chrome/test/chromedriver/chrome/javascript_dialog_manager.cc |
+++ b/chrome/test/chromedriver/chrome/javascript_dialog_manager.cc |
@@ -37,8 +37,13 @@ Status JavaScriptDialogManager::HandleDialog(bool accept, |
if (text) |
params.SetString("promptText", *text); |
Status status = client_->SendCommand("Page.handleJavaScriptDialog", params); |
- if (status.IsError()) |
- return status; |
+ if (status.IsError()) { |
+ // Retry once to work around |
+ // https://bugs.chromium.org/p/chromedriver/issues/detail?id=1500 |
+ status = client_->SendCommand("Page.handleJavaScriptDialog", params); |
+ if (status.IsError()) |
+ return status; |
+ } |
// Remove a dialog from the queue. Need to check the queue is not empty here, |
// because it could have been cleared during waiting for the command |