| OLD | NEW |
| 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 #ifndef CHROME_TEST_WEBDRIVER_SESSION_H_ | 5 #ifndef CHROME_TEST_WEBDRIVER_SESSION_H_ |
| 6 #define CHROME_TEST_WEBDRIVER_SESSION_H_ | 6 #define CHROME_TEST_WEBDRIVER_SESSION_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // script result |value|. | 44 // script result |value|. |
| 45 ErrorCode ExecuteScript(const std::string& script, | 45 ErrorCode ExecuteScript(const std::string& script, |
| 46 const ListValue* const args, | 46 const ListValue* const args, |
| 47 Value** value); | 47 Value** value); |
| 48 | 48 |
| 49 | 49 |
| 50 bool NavigateToURL(const std::string& url); | 50 bool NavigateToURL(const std::string& url); |
| 51 bool GoForward(); | 51 bool GoForward(); |
| 52 bool GoBack(); | 52 bool GoBack(); |
| 53 bool Reload(); | 53 bool Reload(); |
| 54 bool GetURL(GURL* url); |
| 54 bool GetURL(std::string* url); | 55 bool GetURL(std::string* url); |
| 55 bool GetTabTitle(std::string* tab_title); | 56 bool GetTabTitle(std::string* tab_title); |
| 57 bool GetCookies(const GURL& url, std::string* cookies); |
| 58 bool GetCookieByName(const GURL& url, const std::string& cookie_name, |
| 59 std::string* cookie); |
| 60 bool DeleteCookie(const GURL& url, const std::string& cookie_name); |
| 61 bool SetCookie(const GURL& url, const std::string& cookie); |
| 56 | 62 |
| 57 inline const std::string& id() const { return id_; } | 63 inline const std::string& id() const { return id_; } |
| 58 | 64 |
| 59 inline int implicit_wait() { return implicit_wait_; } | 65 inline int implicit_wait() { return implicit_wait_; } |
| 60 inline void set_implicit_wait(const int& timeout) { | 66 inline void set_implicit_wait(const int& timeout) { |
| 61 implicit_wait_ = timeout > 0 ? timeout : 0; | 67 implicit_wait_ = timeout > 0 ? timeout : 0; |
| 62 } | 68 } |
| 63 | 69 |
| 64 enum Speed { kSlow, kMedium, kFast, kUnknown }; | 70 enum Speed { kSlow, kMedium, kFast, kUnknown }; |
| 65 inline Speed speed() { return speed_; } | 71 inline Speed speed() { return speed_; } |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 std::string current_frame_xpath_; | 108 std::string current_frame_xpath_; |
| 103 | 109 |
| 104 DISALLOW_COPY_AND_ASSIGN(Session); | 110 DISALLOW_COPY_AND_ASSIGN(Session); |
| 105 }; | 111 }; |
| 106 | 112 |
| 107 } // namespace webdriver | 113 } // namespace webdriver |
| 108 | 114 |
| 109 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Session); | 115 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Session); |
| 110 | 116 |
| 111 #endif // CHROME_TEST_WEBDRIVER_SESSION_H_ | 117 #endif // CHROME_TEST_WEBDRIVER_SESSION_H_ |
| OLD | NEW |