Chromium Code Reviews| Index: chrome/test/webdriver/session.cc |
| diff --git a/chrome/test/webdriver/session.cc b/chrome/test/webdriver/session.cc |
| index 0247498c32071b404e7f7ef27816da60ba7f1dc0..906ff7cc55b5f89b841857971b0dc84701bd937e 100644 |
| --- a/chrome/test/webdriver/session.cc |
| +++ b/chrome/test/webdriver/session.cc |
| @@ -175,6 +175,16 @@ bool Session::GetURL(std::string* url) { |
| return success; |
| } |
| +bool Session::GetURL(GURL* gurl) { |
| + bool success = false; |
| + RunSessionTask(NewRunnableMethod( |
| + automation_.get(), |
| + &Automation::GetGURL, |
| + gurl, |
| + &success)); |
|
kkania
2011/02/08 18:35:22
indent 2 more here
Joe
2011/02/09 06:32:10
Done.
|
| + return success; |
| +} |
| + |
| bool Session::GetTabTitle(std::string* tab_title) { |
| bool success = false; |
| RunSessionTask(NewRunnableMethod( |
| @@ -185,6 +195,52 @@ bool Session::GetTabTitle(std::string* tab_title) { |
| return success; |
| } |
| +bool Session::GetCookies(const GURL& url, std::string* cookies) { |
| + bool success = false; |
| + RunSessionTask(NewRunnableMethod( |
| + automation_.get(), |
| + &Automation::GetCookies, |
| + url, |
|
kkania
2011/02/08 18:35:22
fix indent
Joe
2011/02/09 06:32:10
Done.
|
| + cookies, |
| + &success)); |
| + return success; |
| +} |
| + |
| +bool Session::GetCookieByName(const GURL& url, const std::string& cookie_name, |
|
kkania
2011/02/08 18:35:22
bool Session::GetCookieByName(const GURL& url,
Joe
2011/02/09 06:32:10
Done.
|
| + std::string* cookie) { |
| + bool success = false; |
| + RunSessionTask(NewRunnableMethod( |
| + automation_.get(), |
| + &Automation::GetCookieByName, |
| + url, |
| + cookie_name, |
| + cookie, |
| + &success)); |
| + return success; |
| +} |
| + |
| +bool Session::DeleteCookie(const GURL& url, const std::string& cookie_name) { |
| + bool success = false; |
| + RunSessionTask(NewRunnableMethod( |
| + automation_.get(), |
| + &Automation::DeleteCookie, |
| + url, |
| + cookie_name, |
| + &success)); |
| + return success; |
| +} |
| + |
| +bool Session::SetCookie(const GURL& url, const std::string& cookie) { |
| + bool success = false; |
| + RunSessionTask(NewRunnableMethod( |
| + automation_.get(), |
| + &Automation::SetCookie, |
| + url, |
| + cookie, |
| + &success)); |
| + return success; |
| +} |
| + |
| void Session::RunSessionTask(Task* task) { |
| base::WaitableEvent done_event(false, false); |
| thread_.message_loop_proxy()->PostTask(FROM_HERE, NewRunnableMethod( |