OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/test/chromedriver/alert_commands.h" | 5 #include "chrome/test/chromedriver/alert_commands.h" |
6 | 6 |
| 7 #include "base/callback.h" |
7 #include "base/values.h" | 8 #include "base/values.h" |
8 #include "chrome/test/chromedriver/chrome/chrome.h" | 9 #include "chrome/test/chromedriver/chrome/chrome.h" |
9 #include "chrome/test/chromedriver/chrome/devtools_client.h" | 10 #include "chrome/test/chromedriver/chrome/devtools_client.h" |
10 #include "chrome/test/chromedriver/chrome/javascript_dialog_manager.h" | 11 #include "chrome/test/chromedriver/chrome/javascript_dialog_manager.h" |
11 #include "chrome/test/chromedriver/chrome/status.h" | 12 #include "chrome/test/chromedriver/chrome/status.h" |
12 #include "chrome/test/chromedriver/chrome/web_view.h" | 13 #include "chrome/test/chromedriver/chrome/web_view.h" |
13 #include "chrome/test/chromedriver/session.h" | 14 #include "chrome/test/chromedriver/session.h" |
14 | 15 |
15 Status ExecuteAlertCommand( | 16 Status ExecuteAlertCommand( |
16 const AlertCommand& alert_command, | 17 const AlertCommand& alert_command, |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 Status ExecuteDismissAlert( | 93 Status ExecuteDismissAlert( |
93 Session* session, | 94 Session* session, |
94 WebView* web_view, | 95 WebView* web_view, |
95 const base::DictionaryValue& params, | 96 const base::DictionaryValue& params, |
96 scoped_ptr<base::Value>* value) { | 97 scoped_ptr<base::Value>* value) { |
97 Status status = web_view->GetJavaScriptDialogManager() | 98 Status status = web_view->GetJavaScriptDialogManager() |
98 ->HandleDialog(false, session->prompt_text.get()); | 99 ->HandleDialog(false, session->prompt_text.get()); |
99 session->prompt_text.reset(); | 100 session->prompt_text.reset(); |
100 return status; | 101 return status; |
101 } | 102 } |
OLD | NEW |