Closed Bug 1410891 Opened 7 years ago Closed 7 years ago

Use command helper function in get_active_element.py

Categories

(Testing :: geckodriver, enhancement)

Version 3
enhancement
Not set
normal

Tracking

(firefox58 fixed)

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: ato, Assigned: ato)

Details

Attachments

(6 files)

Instead of repeating calls to session.transport.send we can make a
helper function that does the correct HTTP request, like most of the
other tests do.
Assignee: nobody → ato
Status: NEW → ASSIGNED
Comment on attachment 8921068 [details]
Bug 1410891 - Remove unused imports from Get Active Element WPT test.

https://reviewboard.mozilla.org/r/192040/#review197720
Attachment #8921068 - Flags: review?(mjzffr) → review+
Comment on attachment 8921069 [details]
Bug 1410891 - Use "is" operator to compare responses.

https://reviewboard.mozilla.org/r/192042/#review197722
Attachment #8921069 - Flags: review?(mjzffr) → review+
Comment on attachment 8921070 [details]
Bug 1410891 - Use "response" consistently.

https://reviewboard.mozilla.org/r/192044/#review197762

r+wc

::: testing/web-platform/tests/webdriver/tests/element_retrieval/get_active_element.py:68
(Diff revision 1)
>  
> -    assert_result_is_active_element(session, result)
> +    assert_is_active_element(session, response)
>      assert_dialog_handled(session, "dismiss #2")
>      assert read_global(session, "dismiss2") is None
>  
> -    create_dialog(session)("prompt", text="dismiss #3", result_var="dismiss3")
> +    create_dialog(session)("prompt", text="dismiss #3", response_var="dismiss3")

I think you want to keep `result_var` here.
Attachment #8921070 - Flags: review?(mjzffr) → review+
Comment on attachment 8921072 [details]
Bug 1410891 - Use a command helper function.

https://reviewboard.mozilla.org/r/192048/#review197766

::: commit-message-3c3dc:3
(Diff revision 1)
> +Bug 1410891 - Use a command helper function. r?maja_zf
> +
> +Instead of repeating to session.transport.send we can use a helper

repeating -calls- to?
Attachment #8921072 - Flags: review?(mjzffr) → review+
Comment on attachment 8921073 [details]
Bug 1410891 - Assert that "value" is in response.

https://reviewboard.mozilla.org/r/192050/#review197768
Attachment #8921073 - Flags: review?(mjzffr) → review+
Comment on attachment 8921072 [details]
Bug 1410891 - Use a command helper function.

https://reviewboard.mozilla.org/r/192048/#review197766

> repeating -calls- to?

Yes, thanks.
Comment on attachment 8921070 [details]
Bug 1410891 - Use "response" consistently.

https://reviewboard.mozilla.org/r/192044/#review197762

> I think you want to keep `result_var` here.

Good thing you spotted this.
Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/765fd4dad6c6
Remove unused imports from Get Active Element WPT test. r=maja_zf
https://hg.mozilla.org/integration/autoland/rev/4dacaa19ecf1
Use "is" operator to compare responses. r=maja_zf
https://hg.mozilla.org/integration/autoland/rev/f874db15ddb1
Use "response" consistently. r=maja_zf
https://hg.mozilla.org/integration/autoland/rev/2252020d2813
Fix prompt handle assertions. r=maja_zf
https://hg.mozilla.org/integration/autoland/rev/e9143b9171f5
Use a command helper function. r=maja_zf
https://hg.mozilla.org/integration/autoland/rev/ba5c4c248d02
Assert that "value" is in response. r=maja_zf
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: