OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_TEST_WEBDRIVER_COMMANDS_ALERT_COMMANDS_H_ | 5 #ifndef CHROME_TEST_WEBDRIVER_COMMANDS_ALERT_COMMANDS_H_ |
6 #define CHROME_TEST_WEBDRIVER_COMMANDS_ALERT_COMMANDS_H_ | 6 #define CHROME_TEST_WEBDRIVER_COMMANDS_ALERT_COMMANDS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "chrome/test/webdriver/commands/webdriver_command.h" | 11 #include "chrome/test/webdriver/commands/webdriver_command.h" |
12 | 12 |
| 13 namespace base { |
13 class DictionaryValue; | 14 class DictionaryValue; |
| 15 } |
14 | 16 |
15 namespace webdriver { | 17 namespace webdriver { |
16 | 18 |
17 class Response; | 19 class Response; |
18 | 20 |
19 // Gets the message of the JavaScript modal dialog, or sets the prompt text. | 21 // Gets the message of the JavaScript modal dialog, or sets the prompt text. |
20 class AlertTextCommand : public WebDriverCommand { | 22 class AlertTextCommand : public WebDriverCommand { |
21 public: | 23 public: |
22 AlertTextCommand(const std::vector<std::string>& path_segments, | 24 AlertTextCommand(const std::vector<std::string>& path_segments, |
23 DictionaryValue* parameters); | 25 base::DictionaryValue* parameters); |
24 virtual ~AlertTextCommand(); | 26 virtual ~AlertTextCommand(); |
25 | 27 |
26 virtual bool DoesGet(); | 28 virtual bool DoesGet(); |
27 virtual bool DoesPost(); | 29 virtual bool DoesPost(); |
28 virtual void ExecuteGet(Response* const response); | 30 virtual void ExecuteGet(Response* const response); |
29 virtual void ExecutePost(Response* const response); | 31 virtual void ExecutePost(Response* const response); |
30 | 32 |
31 private: | 33 private: |
32 DISALLOW_COPY_AND_ASSIGN(AlertTextCommand); | 34 DISALLOW_COPY_AND_ASSIGN(AlertTextCommand); |
33 }; | 35 }; |
34 | 36 |
35 class AcceptAlertCommand : public WebDriverCommand { | 37 class AcceptAlertCommand : public WebDriverCommand { |
36 public: | 38 public: |
37 AcceptAlertCommand(const std::vector<std::string>& path_segments, | 39 AcceptAlertCommand(const std::vector<std::string>& path_segments, |
38 DictionaryValue* parameters); | 40 base::DictionaryValue* parameters); |
39 virtual ~AcceptAlertCommand(); | 41 virtual ~AcceptAlertCommand(); |
40 | 42 |
41 virtual bool DoesPost(); | 43 virtual bool DoesPost(); |
42 virtual void ExecutePost(Response* const response); | 44 virtual void ExecutePost(Response* const response); |
43 | 45 |
44 private: | 46 private: |
45 DISALLOW_COPY_AND_ASSIGN(AcceptAlertCommand); | 47 DISALLOW_COPY_AND_ASSIGN(AcceptAlertCommand); |
46 }; | 48 }; |
47 | 49 |
48 class DismissAlertCommand : public WebDriverCommand { | 50 class DismissAlertCommand : public WebDriverCommand { |
49 public: | 51 public: |
50 DismissAlertCommand(const std::vector<std::string>& path_segments, | 52 DismissAlertCommand(const std::vector<std::string>& path_segments, |
51 DictionaryValue* parameters); | 53 base::DictionaryValue* parameters); |
52 virtual ~DismissAlertCommand(); | 54 virtual ~DismissAlertCommand(); |
53 | 55 |
54 virtual bool DoesPost(); | 56 virtual bool DoesPost(); |
55 virtual void ExecutePost(Response* const response); | 57 virtual void ExecutePost(Response* const response); |
56 | 58 |
57 private: | 59 private: |
58 DISALLOW_COPY_AND_ASSIGN(DismissAlertCommand); | 60 DISALLOW_COPY_AND_ASSIGN(DismissAlertCommand); |
59 }; | 61 }; |
60 | 62 |
61 } // namespace webdriver | 63 } // namespace webdriver |
62 | 64 |
63 #endif // CHROME_TEST_WEBDRIVER_COMMANDS_ALERT_COMMANDS_H_ | 65 #endif // CHROME_TEST_WEBDRIVER_COMMANDS_ALERT_COMMANDS_H_ |
OLD | NEW |