Commit graph

85 commits

Author SHA1 Message Date
Anthony Ramine
7ad51dcd7a Update serde to 0.8 (fixes #12659) 2016-08-12 18:37:27 +02:00
Martin Robinson
6259df5e2d Update to euclid 0.8 2016-08-12 03:12:06 +02:00
bors-servo
a94b92f8c4 Auto merge of #11791 - craftytrickster:11712/pipeline-lookup, r=asajeffrey
Pipeline lookup in webdriver

Fixes #11712

<!-- Please describe your changes on the following line: -->

Removed a method that seemed to duplicate already existing functionality, and returned BrowsingContextErrors in the web_handler file where panics were previously occurring.

I am not sure if I like all the unwrapping that occurs in the script thread, but the current methods are not set up to return Option/Result.

Also, should line the method on line 37 `find_node_by_unique_id` of components/script/webdriver_handlers.rs return None if the context is not found like I have it currently? Or should it return a `Result<Option...>` instead?

<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11712 .

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because I simply removed a method that duplicated already existing functionality. On the other part, I added better error sending instead of forcing a panic, which does not require testing to my knowledge.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11791)
<!-- Reviewable:end -->
2016-07-26 00:44:28 -05:00
David Raifaizen
2475dc1d21 Removed some sources of panic from script thread and devtools, using Option values instead to indicate when a pipeline context is missing where appropriate. Additionally, removed erroneous method get_browsing_context. 2016-07-25 22:28:04 -04:00
Connor Brewster
f131818763 Implement beginnings of joint session history
Fix backward navigation

make use of history iterator

Add frame iterator
add different back logic

cleanup navigation_info

Add extra explanation for iter logic

Remove forward history on full frame tree

Rename navigation to traversal where appropriate

check full tree for can go back/forward

simplify frame iter logic

remove FrameIterator

cleanup history iter

reduce amount of vec allocations

removed extra parenthesis

Remove history iterator

cleanup after rebasing

avoid recursive vec allocation
remove full_frame_tree
remove_forward_history_in_frame_tree -> clear_joint_session_future
2016-07-21 20:51:38 -06:00
Ms2ger
77caf83098 Move webdriver_msg to script_traits. 2016-07-05 09:02:46 +02:00
Ms2ger
54bb138ddc Move WebDriverCommandMsg to script_traits. 2016-07-05 09:02:15 +02:00
James Raspass
a2e3faa9e6 WebDriver: Fix POST /session/:session_id/elements to return multiple 2016-07-04 15:11:01 +01:00
Corey Farwell
22928f50ac Refactor util::prefs operations to be methods on static struct. 2016-07-02 16:43:39 -04:00
Dan Robertson
246723114f
Use common cookie struct add cookie webdriver cmds
One cookie struct to rule them all. One struct to represent them.
One cookie struct to bind them all, and through the IPC carry them.
2016-06-25 22:24:35 +00:00
Connor Brewster
c0ea1f16a8 Added support for navigating by a delta 2016-06-04 18:47:38 -06:00
Josh Matthews
3cb8af20c2 Remove empty lines following braces. 2016-05-27 13:32:05 -04:00
Cullen Rhodes
40acd24e8f Report use statements that use {} with only one entry 2016-05-27 10:18:44 +01:00
Ms2ger
f9a8c322af Use CompositorMsg from script_traits. 2016-05-24 12:29:22 +02:00
Alan Jeffrey
8797f6f3ec Responding to review comments. 2016-05-20 09:45:34 -05:00
Alan Jeffrey
3962ffc501 Added a timeout to SetWindowSize. 2016-05-20 09:20:45 -05:00
Alan Jeffrey
e2203f81d3 Made SetWindowSize synchronous. 2016-05-20 09:20:45 -05:00
Alan Jeffrey
5acf0f9a05 Implemented webdriver SetWindowSize. 2016-05-20 09:20:44 -05:00
bors-servo
1a834b5b83 Auto merge of #11140 - asajeffrey:webdriver-pipeline-wait-for-document-ready, r=jgraham
When webdriver is getting a pipeline id, it should wait for the pipeline document to be ready

Thank you for contributing to Servo! Please add an `X` inside each `[ ]` when the step is complete, and replace `__` with appropriate data:
- [X] `./mach build` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11117 (github issue number if applicable).

Either:
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they only impact webdriver

Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11140)
<!-- Reviewable:end -->
2016-05-12 03:46:59 -07:00
Alan Jeffrey
00a8efe9fd When webdriver is getting a pipeline id, it should wait for the pipeline document to be ready. 2016-05-11 15:27:25 -05:00
Alan Jeffrey
bbf9eca042 Added delete session command. 2016-05-10 13:00:12 -05:00
Rebecca
526525b835 Add referrer policy pass-through and referrer header logic
add pass-through from doc to http-loader for referrer_policy, ref_URL
add logic for setting referer header
add script pass-through for referrer
add unit tests for setting referer header
2016-04-25 16:41:06 -04:00
Simon Sapin
7932ab6ac2 Upgrade to rust-url 1.0 and hyper 0.9 2016-04-23 20:27:58 +02:00
Zbynek Winkler
41c293293b Remove references to unused crates.
The cleanup is based on info from using "-W unused-extern-crates".
2016-04-22 22:20:06 +02:00
Ms2ger
cc6976d92c Update webdriver. 2016-04-06 16:43:10 +02:00
Ms2ger
08083f1c9d Deny unsafe code in more crates. 2016-03-18 14:43:03 +01:00
Daniel Robertson
05547dce5a Macro for boilerplate code in webdriver handle_*
Add a macro for the boilerplate code that appears in most of Handler's
methods handling a WebDriverScriptCommand.
2016-02-26 03:20:10 +00:00
Daniel Robertson
83b2388ef4 Implement GetElementRect webdriver command
Implement the webdriver Get Element Rect command
2016-02-24 11:41:42 -05:00
rohan.prinja
1f02c4ebbb task -> thread 2016-01-10 17:58:13 +09:00
Tetsuharu OHZEKI
4906b38af9 Fix warning: Stop to use deprecated 'SocketAddr::new' 2015-12-11 10:39:23 -05:00
Beomjin Kim
729812f383 Moved CompositorMsg enum into compositing crate.
moved from components/msg/constellation_msg.rs
      to components/compositing/lib.rs

dependencies on compositing crate added in ports/cef/Cargo.lock
2015-12-11 13:42:14 +09:00
bors-servo
0f72049363 Auto merge of #8705 - jsanders:fix-sleep-ms-deprecations, r=metajack,Wafflespeanut
Use thread::sleep instead of deprecated sleep_ms

Similarly, change one instance of `thread::park_timeout_ms`.

Fixes #8694

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8705)
<!-- Reviewable:end -->
2015-11-30 09:20:15 +05:30
bors-servo
a877a56e0e Auto merge of #8661 - craftytrickster:8623/some-webdriver-commands, r=jgraham
Webdriver - GetWindowSize/IsEnabled/IsSelected

Added handlers for https://github.com/servo/servo/issues/8623:
GetWindowSize
IsEnabled(WebElement)
IsSelected(WebElement)

I am not sure how to actually verify my webdriver code works, if someone can give advice I would make the necessary changes.

Thanks!

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8661)
<!-- Reviewable:end -->
2015-11-30 03:42:54 +05:30
David Raifaizen
8d451076e1 Removed duplicate webdriver_traits file and added webdriver handler for GetWindowSize, IsSelected and IsEnabled 2015-11-29 15:48:23 -05:00
James Sanders
3659218c59 Use thread::sleep instead of deprecated sleep_ms
Similarly, change one instance of `thread::park_timeout_ms`.

Fixes #8694
2015-11-29 13:41:04 -07:00
Guillaume Gomez
6e7de62b38 Add check up on extern crate order and sort extern crates alphabetically 2015-11-28 03:11:08 +01:00
jmr0
df49cf2b13 adding tidy rule to warn against use of &String and refactoring instances of &String in codebase 2015-11-25 21:49:12 -05:00
James Graham
f7258e4fcc Add support for getting an element's computed style through WebDriver. 2015-11-20 13:23:38 +00:00
Patrick Walton
1c130819ca compositing: Split Servo up into multiple sandboxed processes.
Multiprocess mode is enabled with the `-M` switch, and sandboxing is
enabled with the `-S` switch.
2015-11-19 16:38:04 -05:00
bors-servo
7f95693288 Auto merge of #8564 - jgraham:webdriver_attr, r=Ms2ger
Implement Get Element Attribute WebDriver command

This intentionally doesn't implement the special handling for boolean
attributes yet, since that requires some kind of exhaustive list of all
such attributes

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8564)
<!-- Reviewable:end -->
2015-11-19 23:16:25 +05:30
James Graham
6446cc3db8 Implement Get Element Attribute WebDriver command 2015-11-18 11:52:05 +00:00
Keith Yeung
19294db6e5 Split ConstellationMsg into ScriptMsg and CompositorMsg 2015-11-16 23:10:53 -08:00
James Graham
09b9293b09 Implement support for WebDriver send keys command.
Supports sending keys to an element. The specification here is still
rather unfinished so the error handling and so on in this code will
need iteration as it becomes clearer what the expected behaviour is.
2015-11-16 22:48:26 +00:00
Glenn Watson
ed72e5766b Remove webdriver use of SubpageId 2015-10-15 07:11:31 +10:00
bors-servo
eb7039d04d Auto merge of #7987 - frewsxcv:clippy, r=Manishearth
Fix issues found by rust-clippy



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7987)
<!-- Reviewable:end -->
2015-10-12 18:33:30 -06:00
Corey Farwell
20beaf5af3 Fix issues found by rust-clippy 2015-10-12 20:21:49 -04:00
Matt Brubeck
e2e142aae8 Replace libpng with image everywhere. 2015-10-10 07:43:11 -07:00
Ms2ger
0f6197a0fd Fix incorrect indentation in handle_take_screenshot. 2015-10-06 18:13:22 +02:00
Ms2ger
2e16c3ca8a Avoid an unnecessary unwrap() call in handle_take_screenshot. 2015-10-06 18:12:55 +02:00
James Graham
bd4e0a1439 Add pref reset support to the WebDriver API. 2015-09-25 00:58:53 +01:00