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

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: added tests which compare against a reference md5 hash Created 9 years, 9 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 79b0b54ab9f2e7676dee7e47ccec608e2625843b..3909871814d60ffe05d58cc8c627c9b6c9f70b06 100644
--- a/chrome/test/webdriver/session.h
+++ b/chrome/test/webdriver/session.h
@@ -103,6 +103,7 @@ 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 GetScreenShot(std::string* png);
// Gets all the currently existing window IDs. Returns true on success.
bool GetWindowIds(std::vector<int>* window_ids);
@@ -173,18 +174,20 @@ class Session {
// Waits for all tabs to stop loading. Returns true on success.
bool WaitForAllTabsToStopLoading();
- inline const std::string& id() const { return id_; }
+ const std::string& id() const;
- inline int implicit_wait() const { return implicit_wait_; }
- inline void set_implicit_wait(const int& timeout) {
- implicit_wait_ = timeout > 0 ? timeout : 0;
- }
+ int implicit_wait() const;
+ void set_implicit_wait(const int& timeout);
enum Speed { kSlow, kMedium, kFast, kUnknown };
- inline Speed speed() { return speed_; }
- inline void set_speed(Speed speed) {
- speed_ = speed;
- }
+ Speed speed();
kkania 2011/03/17 18:35:11 add const;
Joe 2011/03/18 00:33:32 Done.
+ void set_speed(Speed speed);
+
+ // Since screenshots can be very large when in base64 PNG format; the
+ // client is allowed to dyamically enable/disable screenshots on error
+ // during the lifetime of the session.
+ bool get_screenshot_on_error() const;
kkania 2011/03/17 18:35:11 accessor should just be called screenshot_on_error
Joe 2011/03/18 00:33:32 Done.
+ void set_screenshot_on_error(bool error);
const FrameId& current_target() const;
@@ -216,6 +219,7 @@ class Session {
base::Thread thread_;
int implicit_wait_;
+ bool screenshot_on_error_;
Speed speed_;
FrameId current_target_;

Powered by Google App Engine
This is Rietveld 408576698