Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(320)

Unified Diff: chrome/test/chromedriver/chrome/javascript_dialog_manager.cc

Issue 2503533003: [chromedriver] Retry alert handling if HandleJavaScriptDialog fails. (Closed)
Patch Set: add comment Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698