diff options
Diffstat (limited to 'chrome/test/webdriver')
-rw-r--r-- | chrome/test/webdriver/commands/cookie_commands.cc | 33 | ||||
-rw-r--r-- | chrome/test/webdriver/commands/cookie_commands.h | 20 | ||||
-rw-r--r-- | chrome/test/webdriver/cookie.cc | 2 | ||||
-rw-r--r-- | chrome/test/webdriver/cookie.h | 1 |
4 files changed, 45 insertions, 11 deletions
diff --git a/chrome/test/webdriver/commands/cookie_commands.cc b/chrome/test/webdriver/commands/cookie_commands.cc index 8021fa0..04b9637 100644 --- a/chrome/test/webdriver/commands/cookie_commands.cc +++ b/chrome/test/webdriver/commands/cookie_commands.cc @@ -17,6 +17,12 @@ namespace webdriver { +CookieCommand::CookieCommand(const std::vector<std::string>& path_segments, + const DictionaryValue* const parameters) + : WebDriverCommand(path_segments, parameters) {} + +CookieCommand::~CookieCommand() {} + bool CookieCommand::Init(Response* const response) { if (WebDriverCommand::Init(response)) { if (session_->GetURL(¤t_url_)) { @@ -30,6 +36,18 @@ bool CookieCommand::Init(Response* const response) { return false; } +bool CookieCommand::DoesDelete() { + return true; +} + +bool CookieCommand::DoesGet() { + return true; +} + +bool CookieCommand::DoesPost() { + return true; +} + void CookieCommand::ExecuteGet(Response* const response) { // TODO(JMikhail): Add GetJSONCookies to automation proxy since // GetCookies does not return the necessary information @@ -125,6 +143,13 @@ void CookieCommand::ExecuteDelete(Response* const response) { response->set_status(kSuccess); } +NamedCookieCommand::NamedCookieCommand( + const std::vector<std::string>& path_segments, + const DictionaryValue* const parameters) + : WebDriverCommand(path_segments, parameters) {} + +NamedCookieCommand::~NamedCookieCommand() {} + bool NamedCookieCommand::Init(Response* const response) { if (WebDriverCommand::Init(response)) { if (!session_->GetURL(¤t_url_)) { @@ -148,6 +173,14 @@ bool NamedCookieCommand::Init(Response* const response) { return false; } +bool NamedCookieCommand::DoesDelete() { + return true; +} + +bool NamedCookieCommand::DoesGet() { + return true; +} + void NamedCookieCommand::ExecuteGet(Response* const response) { std::string cookie; diff --git a/chrome/test/webdriver/commands/cookie_commands.h b/chrome/test/webdriver/commands/cookie_commands.h index a040185..9a525447 100644 --- a/chrome/test/webdriver/commands/cookie_commands.h +++ b/chrome/test/webdriver/commands/cookie_commands.h @@ -25,15 +25,14 @@ class Response; class CookieCommand : public WebDriverCommand { public: CookieCommand(const std::vector<std::string>& path_segments, - const DictionaryValue* const parameters) - : WebDriverCommand(path_segments, parameters) {} - virtual ~CookieCommand() {} + const DictionaryValue* const parameters); + virtual ~CookieCommand(); virtual bool Init(Response* const response); - virtual bool DoesDelete() { return true; } - virtual bool DoesGet() { return true; } - virtual bool DoesPost() { return true; } + virtual bool DoesDelete(); + virtual bool DoesGet(); + virtual bool DoesPost(); virtual void ExecuteDelete(Response* const response); virtual void ExecuteGet(Response* const response); @@ -51,15 +50,14 @@ class CookieCommand : public WebDriverCommand { class NamedCookieCommand : public WebDriverCommand { public: NamedCookieCommand(const std::vector<std::string>& path_segments, - const DictionaryValue* const parameters) - : WebDriverCommand(path_segments, parameters) {} - virtual ~NamedCookieCommand() {} + const DictionaryValue* const parameters); + virtual ~NamedCookieCommand(); virtual bool Init(Response* const response); protected: - virtual bool DoesDelete() { return true; } - virtual bool DoesGet() { return true; } + virtual bool DoesDelete(); + virtual bool DoesGet(); virtual void ExecuteDelete(Response* const response); virtual void ExecuteGet(Response* const response); diff --git a/chrome/test/webdriver/cookie.cc b/chrome/test/webdriver/cookie.cc index 3d0bf02..5d55c0c 100644 --- a/chrome/test/webdriver/cookie.cc +++ b/chrome/test/webdriver/cookie.cc @@ -89,6 +89,8 @@ Cookie::Cookie(const DictionaryValue& dict) { valid_ = true; } +Cookie::~Cookie() {} + // Convert's to webdriver's cookie spec, see: // http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/cookie DictionaryValue* Cookie::ToDictionary() { diff --git a/chrome/test/webdriver/cookie.h b/chrome/test/webdriver/cookie.h index 00f74f6..d8d1c0a 100644 --- a/chrome/test/webdriver/cookie.h +++ b/chrome/test/webdriver/cookie.h @@ -17,6 +17,7 @@ class Cookie { public: explicit Cookie(const std::string& cookie); explicit Cookie(const DictionaryValue& dict); + ~Cookie(); DictionaryValue* ToDictionary(); // ToJSONString() returns a string form of a JSON object with the required |