Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement ElementClick wd command #24090

Merged
merged 1 commit into from Sep 4, 2019
Merged

Implement ElementClick wd command #24090

merged 1 commit into from Sep 4, 2019

Conversation

@georgeroman
Copy link
Contributor

georgeroman commented Aug 28, 2019


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • There are tests for these changes

This change is Reviewable

@highfive
Copy link

highfive commented Aug 28, 2019

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/webdriver_handlers.rs, components/webdriver_server/lib.rs, components/webdriver_server/actions.rs, components/script/script_thread.rs
  • @jgraham: components/webdriver_server/lib.rs, components/webdriver_server/actions.rs
  • @KiChjang: components/script/webdriver_handlers.rs, components/script/script_thread.rs, components/script_traits/webdriver_msg.rs
@jdm jdm assigned jdm and unassigned paulrouget Aug 28, 2019
let event_target = option_element.upcast::<EventTarget>();
event_target.fire_event(atom!("mouseover"));
event_target.fire_event(atom!("mousemove"));
event_target.fire_event(atom!("mousedown"));

This comment has been minimized.

@jdm

jdm Aug 29, 2019

Member

The spec says to fire events at the parent node throughout this method.

let previous_selectedness = option_element.Selected();

// Step 8.6.3
option_element.SetSelected(true);

This comment has been minimized.

@jdm

jdm Aug 29, 2019

Member

This seems to be ignoring the bit in the spec about the multiple attribute in the element's container.

@jdm
jdm approved these changes Aug 29, 2019
// Step 8
match node.downcast::<HTMLOptionElement>() {
Some(option_element) => {
// https://w3c.github.io/webdriver/#dfn-container

This comment has been minimized.

@jdm

jdm Aug 29, 2019

Member

We should file an issue about extract this into a function that supports optgroup as well (per the spec).

@georgeroman
Copy link
Contributor Author

georgeroman commented Aug 30, 2019

@jdm Is this ready for merging?

@jdm
Copy link
Member

jdm commented Aug 30, 2019

@bors-servo
Copy link
Contributor

bors-servo commented Aug 30, 2019

📌 Commit a0ad0fd has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Aug 30, 2019

Testing commit a0ad0fd with merge af8fc44...

bors-servo added a commit that referenced this pull request Aug 30, 2019
…, r=jdm

Implement ElementClick wd command

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

---
<!-- 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

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24090)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Aug 30, 2019

💔 Test failed - linux-rel-wpt

@CYBAI
Copy link
Collaborator

CYBAI commented Aug 30, 2019

{
    "status": "FAIL", 
    "group": "default", 
    "message": "AssertionError: javascript error (500): JS evaluation raised an exception", 
    "stack": "session = <Session 1f42a8a2-3e79-4849-bcc9-b7e17b9c0dee>\n\n    def test_element_in_collection(session):\n        session.url = inline(\"<div></div>\")\n        divs = session.find.css(\"div\")\n    \n        response = execute_script(session, \"\"\"\n            let div = document.querySelector(\"div\");\n            div.reference = div;\n            return [div];\n            \"\"\")\n>       value = assert_success(response)\n\ndivs       = [<Element 7733c369f4894450a776e665557100d7>]\nresponse   = <Response status=500 error=<JavascriptErrorException http_status=500>>\nsession    = <Session 1f42a8a2-3e79-4849-bcc9-b7e17b9c0dee>\n\ntests/wpt/web-platform-tests/webdriver/tests/execute_script/cyclic.py:61: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nresponse = <Response status=500 error=<JavascriptErrorException http_status=500>>\nvalue = None\n\n    def assert_success(response, value=None):\n        \"\"\"\n        Verify that the provided webdriver.Response instance described\n        a valid success response as defined by `dfn-send-a-response` and\n        the provided response value.\n    \n        :param response: ``webdriver.Response`` instance.\n        :param value: Expected value of the response body, if any.\n        \"\"\"\n>       assert response.status == 200, str(response.error)\nE       AssertionError: javascript error (500): JS evaluation raised an exception\nE         \nE       assert 500 == 200\nE        +  where 500 = <Response status=500 error=<JavascriptErrorException http_status=500>>.status\n\nresponse   = <Response status=500 error=<JavascriptErrorException http_status=500>>\nvalue      = None\n\ntests/wpt/web-platform-tests/webdriver/tests/support/asserts.py:67: AssertionError", 
    "subtest": "test_element_in_collection", 
    "test": "/webdriver/tests/execute_script/cyclic.py", 
    "line": 1338, 
    "action": "test_result", 
    "expected": "PASS"
}
@georgeroman
Copy link
Contributor Author

georgeroman commented Aug 31, 2019

Hmm, this is the same test that strangely failed on Mac in #23725. It now also fails on Linux, that's weird, especially since this PR should have no influence on it.

@georgeroman
Copy link
Contributor Author

georgeroman commented Sep 1, 2019

@bors-servo try=wpt

@bors-servo
Copy link
Contributor

bors-servo commented Sep 1, 2019

Trying commit 32f7254 with merge 1c13c9a...

bors-servo added a commit that referenced this pull request Sep 1, 2019
…, r=<try>

Implement ElementClick wd command

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

---
<!-- 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

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24090)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Sep 1, 2019

💔 Test failed - linux-rel-wpt

@jdm
Copy link
Member

jdm commented Sep 4, 2019

@bors-servo
Copy link
Contributor

bors-servo commented Sep 4, 2019

📌 Commit 32f7254 has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Sep 4, 2019

Testing commit 32f7254 with merge 068997c...

bors-servo added a commit that referenced this pull request Sep 4, 2019
…, r=jdm

Implement ElementClick wd command

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

---
<!-- 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

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24090)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Sep 4, 2019

☀️ Test successful - linux-rel-css, linux-rel-wpt, status-taskcluster
Approved by: jdm
Pushing 068997c to master...

@bors-servo bors-servo merged commit 32f7254 into servo:master Sep 4, 2019
3 checks passed
3 checks passed
Taskcluster (pull_request) TaskGroup: success
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.