Closed Bug 1446169 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 10058 - Changing WebDriver test_parent_htmldocument to expect error

Categories

(Testing :: geckodriver, enhancement, P4)

enhancement

Tracking

(firefox61 fixed)

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: wptsync, Unassigned)

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 10058 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/w3c/web-platform-tests/pull/10058
Details from upstream follow.

Jim Evans wrote:
>  Changing WebDriver test_parent_htmldocument to expect error
>  
>  When the context element is `document.documentElement`, and an attempt is
>  made to find elements from that context element using an XPath of `..`, a
>  snapshot is returned containing the `document` object. While this is
>  apparently the correct behavior for XPath, the WebDriver spec says that if
>  the object in the snapshot is not an element, we should return an error
>  with error code "invalid selector." The test_parent_htmldocument test in
>  both find_element_from_element.py and find_elements_from_element.py expect
>  a success in this case. This commit changes the tests to correctly expect
>  an error from the driver.
Component: web-platform-tests → geckodriver
Ran 2 tests and 44 subtests
OK     : 2
PASS   : 42
FAIL   : 2

Existing tests that now have a worse result (e.g. they used to PASS and now FAIL):
/webdriver/tests/element_retrieval/find_element_from_element.py
    test_parent_htmldocument: FAIL
/webdriver/tests/element_retrieval/find_elements_from_element.py
    test_parent_htmldocument: FAIL
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/fd32b171df22
[wpt PR 10058] - Changing WebDriver test_parent_htmldocument to expect error, a=testonly
https://hg.mozilla.org/mozilla-central/rev/fd32b171df22
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
James, did you ever filed a bug to get this problem fixed? Only marking a test as fail isn't that great. I just stumbled over it.
Flags: needinfo?(james)
No, I'm not triaging the geckodriver component, and there's no way I can file bugs for every wpt sync pr. Auto filing doesn't make sense because there are many cases where a fail isn't a new bug.

This is the same process we've had for a couple  of years but with way more visibility and chances to catch errors. Soon we will also add the wpt.fyi links to each bug when it lands upstream so that the cross-vendor comparison results are available.
Flags: needinfo?(james)
You need to log in before you can comment on or make changes to this bug.