| Index: chrome/test/webdriver/session.h
|
| diff --git a/chrome/test/webdriver/session.h b/chrome/test/webdriver/session.h
|
| index c84656a81125b0154fc0e9ee3545d87a9e65c19e..582364a1f5bb9fa4f7fafedb5e0d7907bf382ee0 100644
|
| --- a/chrome/test/webdriver/session.h
|
| +++ b/chrome/test/webdriver/session.h
|
| @@ -53,9 +53,23 @@ struct FrameId {
|
| // A session manages its own lifetime.
|
| class Session {
|
| public:
|
| + struct Options {
|
| + Options();
|
| + ~Options();
|
| +
|
| + // True if the session should simulate OS-level input. Currently only
|
| + // applies to keyboard input.
|
| + bool use_native_events;
|
| +
|
| + // True if the session should not wait for page loads and navigate
|
| + // asynchronously.
|
| + bool load_async;
|
| + };
|
| +
|
| // Adds this |Session| to the |SessionManager|. The session manages its own
|
| // lifetime. Do not call delete.
|
| - Session();
|
| + explicit Session(const Options& options);
|
| +
|
| // Removes this |Session| from the |SessionManager|.
|
| ~Session();
|
|
|
| @@ -69,6 +83,10 @@ class Session {
|
| const FilePath& user_data_dir,
|
| const CommandLine& options);
|
|
|
| + // Should be called before executing a command. Performs necessary waits
|
| + // and frame switching.
|
| + Error* BeforeExecuteCommand();
|
| +
|
| // Terminates this session and deletes itself.
|
| void Terminate();
|
|
|
| @@ -284,14 +302,10 @@ class Session {
|
| void set_implicit_wait(int timeout_ms);
|
| int implicit_wait() const;
|
|
|
| - void set_screenshot_on_error(bool error);
|
| - bool screenshot_on_error() const;
|
| -
|
| - void set_use_native_events(bool use_native_events);
|
| - bool use_native_events() const;
|
| -
|
| const gfx::Point& get_mouse_position() const;
|
|
|
| + const Options& options() const;
|
| +
|
| private:
|
| void RunSessionTask(Task* task);
|
| void RunSessionTaskOnSessionThread(
|
| @@ -345,15 +359,6 @@ class Session {
|
| // Time (in ms) of how long to wait while searching for a single element.
|
| int implicit_wait_;
|
|
|
| - // 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 screenshot_on_error_;
|
| -
|
| - // True if the session should simulate OS-level input. Currently only applies
|
| - // to keyboard input.
|
| - bool use_native_events_;
|
| -
|
| // Vector of the |WebElementId|s for each frame of the current target frame
|
| // path. The first refers to the first frame element in the root document.
|
| // If the target frame is window.top, this will be empty.
|
| @@ -370,6 +375,8 @@ class Session {
|
| std::string alert_prompt_text_;
|
| bool has_alert_prompt_text_;
|
|
|
| + Options options_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(Session);
|
| };
|
|
|
|
|