OLD | NEW |
1 // Copyright (c) 2010 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_COOKIE_COMMANDS_H_ | 5 #ifndef CHROME_TEST_WEBDRIVER_COMMANDS_COOKIE_COMMANDS_H_ |
6 #define CHROME_TEST_WEBDRIVER_COMMANDS_COOKIE_COMMANDS_H_ | 6 #define CHROME_TEST_WEBDRIVER_COMMANDS_COOKIE_COMMANDS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
(...skipping 21 matching lines...) Expand all Loading... |
33 virtual bool DoesDelete(); | 33 virtual bool DoesDelete(); |
34 virtual bool DoesGet(); | 34 virtual bool DoesGet(); |
35 virtual bool DoesPost(); | 35 virtual bool DoesPost(); |
36 | 36 |
37 virtual void ExecuteDelete(Response* const response); | 37 virtual void ExecuteDelete(Response* const response); |
38 virtual void ExecuteGet(Response* const response); | 38 virtual void ExecuteGet(Response* const response); |
39 virtual void ExecutePost(Response* const response); | 39 virtual void ExecutePost(Response* const response); |
40 | 40 |
41 private: | 41 private: |
42 GURL current_url_; | 42 GURL current_url_; |
| 43 bool uses_new_interface_; |
43 | 44 |
44 DISALLOW_COPY_AND_ASSIGN(CookieCommand); | 45 DISALLOW_COPY_AND_ASSIGN(CookieCommand); |
45 }; | 46 }; |
46 | 47 |
47 // Set a cookie. The cookie should be specified as a JSON object with the | 48 // Set a cookie. The cookie should be specified as a JSON object with the |
48 // following properties: name, value, path, domain, secure, and expiry. See: | 49 // following properties: name, value, path, domain, secure, and expiry. See: |
49 // http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/c
ookie/:name | 50 // http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/c
ookie/:name |
50 class NamedCookieCommand : public WebDriverCommand { | 51 class NamedCookieCommand : public WebDriverCommand { |
51 public: | 52 public: |
52 NamedCookieCommand(const std::vector<std::string>& path_segments, | 53 NamedCookieCommand(const std::vector<std::string>& path_segments, |
53 const DictionaryValue* const parameters); | 54 const DictionaryValue* const parameters); |
54 virtual ~NamedCookieCommand(); | 55 virtual ~NamedCookieCommand(); |
55 | 56 |
56 virtual bool Init(Response* const response); | 57 virtual bool Init(Response* const response); |
57 | 58 |
58 protected: | 59 protected: |
59 virtual bool DoesDelete(); | 60 virtual bool DoesDelete(); |
60 virtual bool DoesGet(); | |
61 | 61 |
62 virtual void ExecuteDelete(Response* const response); | 62 virtual void ExecuteDelete(Response* const response); |
63 virtual void ExecuteGet(Response* const response); | |
64 | 63 |
65 private: | 64 private: |
66 GURL current_url_; | 65 GURL current_url_; |
67 std::string cookie_name_; | 66 std::string cookie_name_; |
| 67 bool uses_new_interface_; |
68 | 68 |
69 DISALLOW_COPY_AND_ASSIGN(NamedCookieCommand); | 69 DISALLOW_COPY_AND_ASSIGN(NamedCookieCommand); |
70 }; | 70 }; |
71 | 71 |
72 } // namespace webdriver | 72 } // namespace webdriver |
73 | 73 |
74 #endif // CHROME_TEST_WEBDRIVER_COMMANDS_COOKIE_COMMANDS_H_ | 74 #endif // CHROME_TEST_WEBDRIVER_COMMANDS_COOKIE_COMMANDS_H_ |
75 | |
OLD | NEW |