OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_SOURCE_COMMAND_H_ | 5 #ifndef CHROME_TEST_WEBDRIVER_COMMANDS_SOURCE_COMMAND_H_ |
6 #define CHROME_TEST_WEBDRIVER_COMMANDS_SOURCE_COMMAND_H_ | 6 #define CHROME_TEST_WEBDRIVER_COMMANDS_SOURCE_COMMAND_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 webdriver { | 13 namespace webdriver { |
14 | 14 |
15 // Controls navigate to new web pages for the current tab. A call with | 15 // Controls navigate to new web pages for the current tab. A call with |
16 // an HTTP GET will return the source of the tab. See: | 16 // an HTTP GET will return the source of the tab. See: |
17 // http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/s
ource | 17 // http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/s
ource |
18 class SourceCommand : public WebDriverCommand { | 18 class SourceCommand : public WebDriverCommand { |
19 public: | 19 public: |
20 inline SourceCommand(const std::vector<std::string>& path_segments, | 20 SourceCommand(const std::vector<std::string>& path_segments, |
21 const DictionaryValue* const parameters) | 21 const DictionaryValue* const parameters); |
22 : WebDriverCommand(path_segments, parameters) {} | 22 virtual ~SourceCommand(); |
23 virtual ~SourceCommand() {} | |
24 | 23 |
25 virtual bool DoesGet() { return true; } | 24 virtual bool DoesGet(); |
26 virtual void ExecuteGet(Response* const response); | 25 virtual void ExecuteGet(Response* const response); |
27 | 26 |
28 private: | 27 private: |
29 virtual bool RequiresValidTab() { return true; } | 28 virtual bool RequiresValidTab(); |
30 | 29 |
31 DISALLOW_COPY_AND_ASSIGN(SourceCommand); | 30 DISALLOW_COPY_AND_ASSIGN(SourceCommand); |
32 }; | 31 }; |
33 | 32 |
34 } // namespace webdriver | 33 } // namespace webdriver |
35 | 34 |
36 #endif // CHROME_TEST_WEBDRIVER_COMMANDS_SOURCE_COMMAND_H_ | 35 #endif // CHROME_TEST_WEBDRIVER_COMMANDS_SOURCE_COMMAND_H_ |
37 | 36 |
OLD | NEW |