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

Side by Side Diff: chrome/test/webdriver/automation.cc

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/automation.h ('k') | chrome/test/webdriver/chromedriver_tests.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "chrome/test/webdriver/automation.h" 5 #include "chrome/test/webdriver/automation.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 105 }
106 106
107 void Automation::GetURL(std::string* url, 107 void Automation::GetURL(std::string* url,
108 bool* success) { 108 bool* success) {
109 GURL gurl; 109 GURL gurl;
110 *success = tab_->GetCurrentURL(&gurl); 110 *success = tab_->GetCurrentURL(&gurl);
111 if (*success) 111 if (*success)
112 *url = gurl.possibly_invalid_spec(); 112 *url = gurl.possibly_invalid_spec();
113 } 113 }
114 114
115 void Automation::GetGURL(GURL* gurl,
116 bool* success) {
117 *success = tab_->GetCurrentURL(gurl);
118 }
119
115 void Automation::GetTabTitle(std::string* tab_title, 120 void Automation::GetTabTitle(std::string* tab_title,
116 bool* success) { 121 bool* success) {
117 std::wstring wide_title; 122 std::wstring wide_title;
118 *success = tab_->GetTabTitle(&wide_title); 123 *success = tab_->GetTabTitle(&wide_title);
119 if (*success) 124 if (*success)
120 *tab_title = WideToUTF8(wide_title); 125 *tab_title = WideToUTF8(wide_title);
121 } 126 }
122 127
128 void Automation::GetCookies(const GURL& gurl,
129 std::string* cookies,
130 bool* success) {
131 *success = tab_->GetCookies(gurl, cookies);
132 }
133
134 void Automation::GetCookieByName(const GURL& gurl,
135 const std::string& cookie_name,
136 std::string* cookie,
137 bool* success) {
138 *success = tab_->GetCookieByName(gurl, cookie_name, cookie);
139 }
140
141 void Automation::DeleteCookie(const GURL& gurl,
142 const std::string& cookie_name,
143 bool* success) {
144 *success = tab_->DeleteCookie(gurl, cookie_name);
145 }
146
147 void Automation::SetCookie(const GURL& gurl,
148 const std::string& cookie,
149 bool* success) {
150 *success = tab_->SetCookie(gurl, cookie);
151 }
152
123 } // namespace webdriver 153 } // namespace webdriver
OLDNEW
« no previous file with comments | « chrome/test/webdriver/automation.h ('k') | chrome/test/webdriver/chromedriver_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698