Review possible relaxed deserialization of payload data (not strict WebDriver conformant)
Categories
(Testing :: geckodriver, defect, P1)
Tracking
(firefox-esr60 unaffected, firefox64 wontfix, firefox65 wontfix, firefox66 fixed)
Tracking | Status | |
---|---|---|
firefox-esr60 | --- | unaffected |
firefox64 | --- | wontfix |
firefox65 | --- | wontfix |
firefox66 | --- | fixed |
People
(Reporter: whimboo, Assigned: whimboo)
References
Details
(Keywords: regression)
Attachments
(2 files)
Assignee | ||
Comment 1•6 years ago
|
||
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
Comment 4•6 years ago
|
||
Comment 5•6 years ago
|
||
Assignee | ||
Comment 6•6 years ago
|
||
The problem with timeout parameters actually was that we denied unknown fields. Thankfully that flag for Serde was only set for this struct, so nothing else should actually be affected. I will add a couple more webdriver unittests.
Assignee | ||
Comment 7•6 years ago
|
||
Assignee | ||
Comment 8•6 years ago
|
||
It fixes the regression from the transition to Serde (bug 1396821),
which accidentally denied unknown fields.
Comment 10•6 years ago
|
||
Comment 11•6 years ago
|
||
Backed out for /webdriver/tests/set_timeouts/set.py failures
backout: https://hg.mozilla.org/integration/autoland/rev/aefe78c0ffdfd7db65e03a893b75e36c8d8fb111
push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&searchStr=wd2&revision=bec3fe861b0652f81ba635eee4155b8063430d5a&selectedJob=224032714
failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=224032714&repo=autoland&lineNumber=85291
[task 2019-01-25T15:08:30.018Z] 15:08:30 INFO - TEST-PASS | /webdriver/tests/set_timeouts/set.py | test_parameters_empty_no_change
[task 2019-01-25T15:08:30.018Z] 15:08:30 INFO - TEST-PASS | /webdriver/tests/set_timeouts/set.py | test_script_parameter_empty_no_change
[task 2019-01-25T15:08:30.019Z] 15:08:30 INFO - TEST-UNEXPECTED-FAIL | /webdriver/tests/set_timeouts/set.py | test_key_invalid - assert 200 == 400
[task 2019-01-25T15:08:30.019Z] 15:08:30 INFO - session = <Session 6d57baf4-2d60-40d7-bc65-451cea91b5aa>
[task 2019-01-25T15:08:30.019Z] 15:08:30 INFO -
[task 2019-01-25T15:08:30.020Z] 15:08:30 INFO - def test_key_invalid(session):
[task 2019-01-25T15:08:30.020Z] 15:08:30 INFO - response = set_timeouts(session, {"foo": 1000})
[task 2019-01-25T15:08:30.020Z] 15:08:30 INFO - > assert_error(response, "invalid argument")
[task 2019-01-25T15:08:30.020Z] 15:08:30 INFO -
[task 2019-01-25T15:08:30.020Z] 15:08:30 INFO - response = <Responsetatus=200 body={"value": null}>
[task 2019-01-25T15:08:30.021Z] 15:08:30 INFO - session = <Session 6d57baf4-2d60-40d7-bc65-451cea91b5aa>
[task 2019-01-25T15:08:30.022Z] 15:08:30 INFO -
[task 2019-01-25T15:08:30.022Z] 15:08:30 INFO - tests/web-platform/tests/webdriver/tests/set_timeouts/set.py:53:
[task 2019-01-25T15:08:30.022Z] 15:08:30 INFO - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[task 2019-01-25T15:08:30.022Z] 15:08:30 INFO -
[task 2019-01-25T15:08:30.022Z] 15:08:30 INFO - response = <Responsetatus=200 body={"value": null}>
[task 2019-01-25T15:08:30.023Z] 15:08:30 INFO - error_code = 'invalid argument'
[task 2019-01-25T15:08:30.023Z] 15:08:30 INFO -
[task 2019-01-25T15:08:30.024Z] 15:08:30 INFO - def assert_error(response, error_code):
[task 2019-01-25T15:08:30.024Z] 15:08:30 INFO - """
[task 2019-01-25T15:08:30.024Z] 15:08:30 INFO - Verify that the provided webdriver.Response instance described
[task 2019-01-25T15:08:30.024Z] 15:08:30 INFO - a valid error response as defined by dfn-send-an-error
and
[task 2019-01-25T15:08:30.024Z] 15:08:30 INFO - the provided error code.
[task 2019-01-25T15:08:30.024Z] 15:08:30 INFO -
[task 2019-01-25T15:08:30.025Z] 15:08:30 INFO - :param response: webdriver.Response
instance.
[task 2019-01-25T15:08:30.025Z] 15:08:30 INFO - :param error_code: String value of the expected error code
[task 2019-01-25T15:08:30.025Z] 15:08:30 INFO - """
[task 2019-01-25T15:08:30.025Z] 15:08:30 INFO - > assert response.status == errors[error_code]
[task 2019-01-25T15:08:30.026Z] 15:08:30 INFO - E assert 200 == 400
[task 2019-01-25T15:08:30.026Z] 15:08:30 INFO - E + where 200 = <Responsetatus=200 body={"value": null}>.status
[task 2019-01-25T15:08:30.026Z] 15:08:30 INFO -
[task 2019-01-25T15:08:30.026Z] 15:08:30 INFO - error_code = 'invalid argument'
[task 2019-01-25T15:08:30.027Z] 15:08:30 INFO - response = <Responsetatus=200 body={"value": null}>
[task 2019-01-25T15:08:30.027Z] 15:08:30 INFO -
[task 2019-01-25T15:08:30.027Z] 15:08:30 INFO - tests/web-platform/tests/webdriver/tests/support/asserts.py:50: AssertionError
[task 2019-01-25T15:08:30.040Z] 15:08:30 INFO - ..................................
[task 2019-01-25T15:08:30.043Z] 15:08:30 INFO - TEST-OK | /webdriver/tests/set_timeouts/set.py | took 7860ms
Assignee | ||
Comment 12•6 years ago
|
||
This is a problem with an invalid test, which shouldn't have been added to the wdspec tests. Reason is that it uses an unknown key for the type of timeout, which should simply be ignored. And that is what this patch is actually doing.
As discussed with Andreas on IRC we will remove this specific test.
Assignee | ||
Comment 13•6 years ago
|
||
Depends on D17634
Comment 14•6 years ago
|
||
Comment 15•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8c311adb2434
https://hg.mozilla.org/mozilla-central/rev/4be8f5920abe
Updated•6 years ago
|
Description
•