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

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: kdsodkoskdoskdokosdksdkso 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
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/logging.h" 8 #include "base/logging.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 } 77 }
78 78
79 void Automation::GetURL(std::string* url, 79 void Automation::GetURL(std::string* url,
80 bool* success) { 80 bool* success) {
81 GURL gurl; 81 GURL gurl;
82 *success = tab_->GetCurrentURL(&gurl); 82 *success = tab_->GetCurrentURL(&gurl);
83 if (*success) 83 if (*success)
84 *url = gurl.possibly_invalid_spec(); 84 *url = gurl.possibly_invalid_spec();
85 } 85 }
86 86
87 void Automation::GetGURL(GURL* gurl,
88 bool* success) {
kkania 2011/02/09 16:53:13 the indents in this file are still not fixed. fix.
89 *success = tab_->GetCurrentURL(gurl);
90 }
91
87 void Automation::GetTabTitle(std::string* tab_title, 92 void Automation::GetTabTitle(std::string* tab_title,
88 bool* success) { 93 bool* success) {
89 std::wstring wide_title; 94 std::wstring wide_title;
90 *success = tab_->GetTabTitle(&wide_title); 95 *success = tab_->GetTabTitle(&wide_title);
91 if (*success) 96 if (*success)
92 *tab_title = WideToUTF8(wide_title); 97 *tab_title = WideToUTF8(wide_title);
93 } 98 }
94 99
100 void Automation::GetCookies(const GURL& gurl,
101 std::string* cookies,
102 bool* success) {
103 *success = tab_->GetCookies(gurl, cookies);
104 }
105
106 void Automation::GetCookieByName(const GURL& gurl,
107 const std::string& cookie_name,
108 std::string* cookie,
109 bool* success) {
110 *success = tab_->GetCookieByName(gurl, cookie_name, cookie);
111 }
112
113 void Automation::DeleteCookie(const GURL& gurl,
114 const std::string& cookie_name,
115 bool* success) {
116 *success = tab_->DeleteCookie(gurl, cookie_name);
117 }
118
119 void Automation::SetCookie(const GURL& gurl,
120 const std::string& cookie,
121 bool* success) {
122 *success = tab_->SetCookie(gurl, cookie);
123 }
124
95 } // namespace webdriver 125 } // namespace webdriver
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698