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

Unified Diff: chrome/test/webdriver/session.h

Issue 5572001: Send screenshots back to the client for debugging (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fixed nit 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/webdriver/session.h
diff --git a/chrome/test/webdriver/session.h b/chrome/test/webdriver/session.h
index 222823c24a4697f305065a251800038d07669368..90774c8feb344d8b95393c47357f7bb3ffa83516 100644
--- a/chrome/test/webdriver/session.h
+++ b/chrome/test/webdriver/session.h
@@ -80,7 +80,6 @@ class Session {
void MouseClick(const gfx::Point& click, int flags);
bool MouseMove(const gfx::Point& location);
bool MouseDrag(const gfx::Point& start, const gfx::Point& end);
-
bool NavigateToURL(const std::string& url);
bool GoForward();
bool GoBack();
@@ -93,6 +92,8 @@ class Session {
std::string* cookie);
bool DeleteCookie(const GURL& url, const std::string& cookie_name);
bool SetCookie(const GURL& url, const std::string& cookie);
+ bool CaptureEntirePageAsPNG(const FilePath& path);
+ bool ScreenshotAsBase64(std::string* screenshot);
// Gets all the currently existing window IDs. Returns true on success.
bool GetWindowIds(std::vector<int>* window_ids);
@@ -147,28 +148,19 @@ class Session {
// Waits for all tabs to stop loading. Returns true on success.
bool WaitForAllTabsToStopLoading();
- inline const std::string& id() const { return id_; }
-
- inline int implicit_wait() const { return implicit_wait_; }
- inline void set_implicit_wait(const int& timeout) {
- implicit_wait_ = timeout > 0 ? timeout : 0;
- }
+ std::string Id() const;
- enum Speed { kSlow, kMedium, kFast, kUnknown };
- inline Speed speed() { return speed_; }
- inline void set_speed(Speed speed) {
- speed_ = speed;
- }
+ int ImplicitWait() const;
+ void SetImplicitWait(const int timeout);
- inline const std::string& current_frame_xpath() const {
- return current_frame_xpath_;
- }
+ enum InputSpeed { kSlow, kMedium, kFast, kUnknown };
+ Session::InputSpeed Speed() const;
+ void SetSpeed(const InputSpeed& speed);
- inline void set_current_frame_xpath(const std::string& xpath) {
- current_frame_xpath_ = xpath;
- }
+ std::string CurrentFrameXPath() const;
+ void SetCurrentFrameXPath(const std::string& xpath);
- inline int current_window_id() const { return current_window_id_; }
+ int CurrentWindowId() const;
private:
void RunSessionTask(Task* task);
@@ -200,7 +192,7 @@ class Session {
base::Thread thread_;
int implicit_wait_;
- Speed speed_;
+ InputSpeed speed_;
// The XPath to the frame within this session's active tab which all
// commands should be directed to. XPath strings can represent a frame deep

Powered by Google App Engine
This is Rietveld 408576698