Chromium Code Reviews| 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_WEBDRIVER_SESSION_H_ | 5 #ifndef CHROME_TEST_WEBDRIVER_WEBDRIVER_SESSION_H_ |
| 6 #define CHROME_TEST_WEBDRIVER_WEBDRIVER_SESSION_H_ | 6 #define CHROME_TEST_WEBDRIVER_WEBDRIVER_SESSION_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 Options(); | 53 Options(); |
| 54 ~Options(); | 54 ~Options(); |
| 55 | 55 |
| 56 // True if the session should simulate OS-level input. Currently only | 56 // True if the session should simulate OS-level input. Currently only |
| 57 // applies to keyboard input. | 57 // applies to keyboard input. |
| 58 bool use_native_events; | 58 bool use_native_events; |
| 59 | 59 |
| 60 // True if the session should not wait for page loads and navigate | 60 // True if the session should not wait for page loads and navigate |
| 61 // asynchronously. | 61 // asynchronously. |
| 62 bool load_async; | 62 bool load_async; |
| 63 | |
| 64 // If true, ChromeDriver will bypass certain configuration options that | |
|
Huyen
2011/12/09 23:56:55
Maybe reorder the wording a little bit:
"By defaul
kkania
2011/12/10 00:37:44
Done.
| |
| 65 // are convenient for normal website testing with WebDriver. E.g., if | |
| 66 // false, ChromeDriver will configure Chrome so that websites automatically | |
| 67 // can track user location without running into an infobar. | |
| 68 bool no_website_testing_defaults; | |
| 69 | |
| 70 // A list of extensions to install on startup. | |
| 71 std::vector<FilePath> extensions; | |
| 63 }; | 72 }; |
| 64 | 73 |
| 65 // Adds this |Session| to the |SessionManager|. The session manages its own | 74 // Adds this |Session| to the |SessionManager|. The session manages its own |
| 66 // lifetime. Do not call delete. | 75 // lifetime. Do not call delete. |
| 67 explicit Session(const Options& options); | 76 explicit Session(const Options& options); |
| 68 | 77 |
| 69 // Removes this |Session| from the |SessionManager|. | 78 // Removes this |Session| from the |SessionManager|. |
| 70 ~Session(); | 79 ~Session(); |
| 71 | 80 |
| 72 // Starts the session thread and a new browser, using the exe found at | 81 // Starts the session thread and a new browser, using the exe found at |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 309 | 318 |
| 310 // Install packed extension at |path|. | 319 // Install packed extension at |path|. |
| 311 Error* InstallExtensionDeprecated(const FilePath& path); | 320 Error* InstallExtensionDeprecated(const FilePath& path); |
| 312 | 321 |
| 313 // Get installed extensions IDs. | 322 // Get installed extensions IDs. |
| 314 Error* GetInstalledExtensions(std::vector<std::string>* extension_ids); | 323 Error* GetInstalledExtensions(std::vector<std::string>* extension_ids); |
| 315 | 324 |
| 316 // Install extension at |path|. | 325 // Install extension at |path|. |
| 317 Error* InstallExtension(const FilePath& path, std::string* extension_id); | 326 Error* InstallExtension(const FilePath& path, std::string* extension_id); |
| 318 | 327 |
| 328 // Sets the preference to the given value. This function takes ownership | |
| 329 // of |value|. If the preference is a user preference (instead of local | |
| 330 // state preference) |is_user_pref| should be true. | |
| 331 Error* SetPreference(const std::string& pref, | |
| 332 bool is_user_pref, | |
| 333 base::Value* value); | |
| 334 | |
| 319 const std::string& id() const; | 335 const std::string& id() const; |
| 320 | 336 |
| 321 const FrameId& current_target() const; | 337 const FrameId& current_target() const; |
| 322 | 338 |
| 323 void set_async_script_timeout(int timeout_ms); | 339 void set_async_script_timeout(int timeout_ms); |
| 324 int async_script_timeout() const; | 340 int async_script_timeout() const; |
| 325 | 341 |
| 326 void set_implicit_wait(int timeout_ms); | 342 void set_implicit_wait(int timeout_ms); |
| 327 int implicit_wait() const; | 343 int implicit_wait() const; |
| 328 | 344 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 377 const FrameId& frame_id, | 393 const FrameId& frame_id, |
| 378 const ElementId& element, | 394 const ElementId& element, |
| 379 const Point& location); | 395 const Point& location); |
| 380 Error* GetElementRegionInViewHelper( | 396 Error* GetElementRegionInViewHelper( |
| 381 const FrameId& frame_id, | 397 const FrameId& frame_id, |
| 382 const ElementId& element, | 398 const ElementId& element, |
| 383 const Rect& region, | 399 const Rect& region, |
| 384 bool center, | 400 bool center, |
| 385 bool verify_clickable_at_middle, | 401 bool verify_clickable_at_middle, |
| 386 Point* location); | 402 Point* location); |
| 403 Error* PostBrowserStartInit(); | |
| 404 Error* InitForWebsiteTesting(); | |
| 387 | 405 |
| 388 const std::string id_; | 406 const std::string id_; |
| 389 FrameId current_target_; | 407 FrameId current_target_; |
| 390 | 408 |
| 391 scoped_ptr<Automation> automation_; | 409 scoped_ptr<Automation> automation_; |
| 392 base::Thread thread_; | 410 base::Thread thread_; |
| 393 | 411 |
| 394 // Timeout (in ms) for asynchronous script execution. | 412 // Timeout (in ms) for asynchronous script execution. |
| 395 int async_script_timeout_; | 413 int async_script_timeout_; |
| 396 | 414 |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 416 Options options_; | 434 Options options_; |
| 417 | 435 |
| 418 DISALLOW_COPY_AND_ASSIGN(Session); | 436 DISALLOW_COPY_AND_ASSIGN(Session); |
| 419 }; | 437 }; |
| 420 | 438 |
| 421 } // namespace webdriver | 439 } // namespace webdriver |
| 422 | 440 |
| 423 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Session); | 441 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Session); |
| 424 | 442 |
| 425 #endif // CHROME_TEST_WEBDRIVER_WEBDRIVER_SESSION_H_ | 443 #endif // CHROME_TEST_WEBDRIVER_WEBDRIVER_SESSION_H_ |
| OLD | NEW |