Closed Bug 1486456 Opened Last year Closed Last year

[wdspec] Add basic tests for "Get Element rect"

Categories

(Testing :: geckodriver, enhancement, P2)

Version 3
enhancement

Tracking

(firefox63 fixed)

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

Details

Attachments

(1 file, 1 obsolete file)

Those tests are missing, and I would like to see the coverage to prove that we don't regress something with the move to Serde in geckodriver.
Comment on attachment 9004215 [details] [diff] [review]
[wdspec] Add basic tests for "Get Element rect"

Review of attachment 9004215 [details] [diff] [review]:
-----------------------------------------------------------------

::: testing/web-platform/tests/webdriver/tests/get_element_rect/__init__.py
@@ +2,5 @@
> +    return session.execute_script("""
> +        let rect = arguments[0].getBoundingClientRect();
> +        return {
> +            x: rect.left,
> +            y: rect.top,

In Marionette, this is defined as rect.x + window.pageXOffset.  Is
this equivalent to rect.left?

::: testing/web-platform/tests/webdriver/tests/get_element_rect/get.py
@@ +24,5 @@
> +    assert_error(result, "no such element")
> +
> +
> +def test_element_stale(session):
> +    session.url = inline("<input id=i1>")

id is unused.
Attachment #9004215 - Flags: review?(ato) → review+
(In reply to Andreas Tolfsen ﹝:ato﹞ from comment #3)
> ::: testing/web-platform/tests/webdriver/tests/get_element_rect/__init__.py
> @@ +2,5 @@
> > +    return session.execute_script("""
> > +        let rect = arguments[0].getBoundingClientRect();
> > +        return {
> > +            x: rect.left,
> > +            y: rect.top,
> 
> In Marionette, this is defined as rect.x + window.pageXOffset.  Is
> this equivalent to rect.left?

Good call! Given that in the testcase the page isn't scrolled those values are 0. As such it just works. But to make the method taking into account any scrolling, we should indeed at it.
Comment on attachment 9004537 [details] [diff] [review]
[wdspec] Add basic tests for "Get Element rect"

Update review comments, and taking over r+.
Attachment #9004537 - Flags: review+
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4c623a756c06
[wdspec] Add basic tests for "Get Element rect". r=ato
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/12720 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
https://hg.mozilla.org/mozilla-central/rev/4c623a756c06
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.