| 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_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> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // Retrieve all cookies visible to the current page. Each cookie will be | 23 // Retrieve all cookies visible to the current page. Each cookie will be |
| 24 // returned as a JSON object with the following properties: | 24 // returned as a JSON object with the following properties: |
| 25 // name, value, path, domain, secure, and expiry. See: | 25 // name, value, path, domain, secure, and expiry. See: |
| 26 // http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/c
ookie | 26 // http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/c
ookie |
| 27 class CookieCommand : public WebDriverCommand { | 27 class CookieCommand : public WebDriverCommand { |
| 28 public: | 28 public: |
| 29 CookieCommand(const std::vector<std::string>& path_segments, | 29 CookieCommand(const std::vector<std::string>& path_segments, |
| 30 const base::DictionaryValue* const parameters); | 30 const base::DictionaryValue* const parameters); |
| 31 virtual ~CookieCommand(); | 31 virtual ~CookieCommand(); |
| 32 | 32 |
| 33 virtual bool DoesDelete(); | 33 virtual bool DoesDelete() OVERRIDE; |
| 34 virtual bool DoesGet(); | 34 virtual bool DoesGet() OVERRIDE; |
| 35 virtual bool DoesPost(); | 35 virtual bool DoesPost() OVERRIDE; |
| 36 | 36 |
| 37 virtual void ExecuteDelete(Response* const response); | 37 virtual void ExecuteDelete(Response* const response) OVERRIDE; |
| 38 virtual void ExecuteGet(Response* const response); | 38 virtual void ExecuteGet(Response* const response) OVERRIDE; |
| 39 virtual void ExecutePost(Response* const response); | 39 virtual void ExecutePost(Response* const response) OVERRIDE; |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 DISALLOW_COPY_AND_ASSIGN(CookieCommand); | 42 DISALLOW_COPY_AND_ASSIGN(CookieCommand); |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 // Set a cookie. The cookie should be specified as a JSON object with the | 45 // Set a cookie. The cookie should be specified as a JSON object with the |
| 46 // following properties: name, value, path, domain, secure, and expiry. See: | 46 // following properties: name, value, path, domain, secure, and expiry. See: |
| 47 // http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/c
ookie/:name | 47 // http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/c
ookie/:name |
| 48 class NamedCookieCommand : public WebDriverCommand { | 48 class NamedCookieCommand : public WebDriverCommand { |
| 49 public: | 49 public: |
| 50 NamedCookieCommand(const std::vector<std::string>& path_segments, | 50 NamedCookieCommand(const std::vector<std::string>& path_segments, |
| 51 const base::DictionaryValue* const parameters); | 51 const base::DictionaryValue* const parameters); |
| 52 virtual ~NamedCookieCommand(); | 52 virtual ~NamedCookieCommand(); |
| 53 | 53 |
| 54 virtual bool Init(Response* const response); | 54 virtual bool Init(Response* const response) OVERRIDE; |
| 55 | 55 |
| 56 virtual bool DoesDelete(); | 56 virtual bool DoesDelete() OVERRIDE; |
| 57 | 57 |
| 58 virtual void ExecuteDelete(Response* const response); | 58 virtual void ExecuteDelete(Response* const response) OVERRIDE; |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 std::string cookie_name_; | 61 std::string cookie_name_; |
| 62 | 62 |
| 63 DISALLOW_COPY_AND_ASSIGN(NamedCookieCommand); | 63 DISALLOW_COPY_AND_ASSIGN(NamedCookieCommand); |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 } // namespace webdriver | 66 } // namespace webdriver |
| 67 | 67 |
| 68 #endif // CHROME_TEST_WEBDRIVER_COMMANDS_COOKIE_COMMANDS_H_ | 68 #endif // CHROME_TEST_WEBDRIVER_COMMANDS_COOKIE_COMMANDS_H_ |
| OLD | NEW |