Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: chrome/test/webdriver/cookie.h

Issue 6330012: Cookie commands for the webdriver protocol (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: minor fixes Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/webdriver/commands/webdriver_command.cc ('k') | chrome/test/webdriver/cookie.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_TEST_WEBDRIVER_COOKIE_H_
6 #define CHROME_TEST_WEBDRIVER_COOKIE_H_
7 #pragma once
8
9 #include <string>
10
11 #include "base/values.h"
12
13 namespace webdriver {
14
15 // Class used to convert cookies to various formats.
16 class Cookie {
17 public:
18 explicit Cookie(const std::string& cookie);
19 explicit Cookie(const DictionaryValue& dict);
20
21 DictionaryValue* ToDictionary();
22 // ToJSONString() returns a string form of a JSON object with the required
23 // WebDriver tags. Note that this format cannot be used to set a cookie in
24 // the chrome browser. Example { "name"="foo", "value"="bar"}
25 std::string ToJSONString();
26 // ToString() returns a string format expected by chrome to for a cookie.
27 // Example: "foo=bar"
28 std::string ToString();
29
30 bool valid() const { return valid_; }
31 const std::string& name() const { return name_; }
32
33 private:
34 std::string name_;
35 std::string value_;
36 std::string path_;
37 std::string domain_;
38 std::string expires_;
39 bool secure_;
40 bool http_;
41 bool valid_;
42
43 DISALLOW_COPY_AND_ASSIGN(Cookie);
44 };
45
46 } // namespace webdriver
47
48 #endif // CHROME_TEST_WEBDRIVER_COOKIE_H_
OLDNEW
« no previous file with comments | « chrome/test/webdriver/commands/webdriver_command.cc ('k') | chrome/test/webdriver/cookie.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698