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
3 // found in the LICENSE file.
5 #ifndef CHROME_TEST_CHROMEDRIVER_ALERT_COMMANDS_H_
6 #define CHROME_TEST_CHROMEDRIVER_ALERT_COMMANDS_H_
8 #include "base/callback_forward.h"
9 #include "base/memory/scoped_ptr.h"
12 class DictionaryValue
;
20 typedef base::Callback
<Status(
23 const base::DictionaryValue
&,
24 scoped_ptr
<base::Value
>*)> AlertCommand
;
26 // Executes an alert command.
27 Status
ExecuteAlertCommand(
28 const AlertCommand
& alert_command
,
30 const base::DictionaryValue
& params
,
31 scoped_ptr
<base::Value
>* value
);
33 // Returns whether an alert is open.
34 Status
ExecuteGetAlert(
37 const base::DictionaryValue
& params
,
38 scoped_ptr
<base::Value
>* value
);
40 // Returns the text of the open alert.
41 Status
ExecuteGetAlertText(
44 const base::DictionaryValue
& params
,
45 scoped_ptr
<base::Value
>* value
);
47 // Sets the value of the alert prompt.
48 Status
ExecuteSetAlertValue(
51 const base::DictionaryValue
& params
,
52 scoped_ptr
<base::Value
>* value
);
54 // Accepts the open alert.
55 Status
ExecuteAcceptAlert(
58 const base::DictionaryValue
& params
,
59 scoped_ptr
<base::Value
>* value
);
61 // Dismisses the open alert.
62 Status
ExecuteDismissAlert(
65 const base::DictionaryValue
& params
,
66 scoped_ptr
<base::Value
>* value
);
68 #endif // CHROME_TEST_CHROMEDRIVER_ALERT_COMMANDS_H_