As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact bugzilla-admin@mozilla.org
Last Comment Bug 1282873 - Look for proxy settings in both required- and desired capabilities sets
: Look for proxy settings in both required- and desired capabilities sets
Status: RESOLVED FIXED
:
Product: Testing
Classification: Components
Component: Marionette (show other bugs)
: Version 3
: All All
: -- normal (vote)
: mozilla53
Assigned To: Andreas Tolfsen ‹:ato›
:
:
Mentors:
Depends on: 1326534
Blocks: webdriver
  Show dependency treegraph
 
Reported: 2016-06-28 11:21 PDT by Andreas Tolfsen ‹:ato›
Modified: 2017-01-09 00:59 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
fixed
fixed


Attachments

Description User image Andreas Tolfsen ‹:ato› 2016-06-28 11:21:42 PDT
According to https://github.com/mozilla/geckodriver/issues/97#issuecomment-229129641 Marionette only looks for the proxy settings in the requiredCapabilities field.  It should also look in the desiredCapabilities field.

https://dxr.mozilla.org/mozilla-central/source/testing/marionette/driver.js#601
Comment 1 User image David Burns :automatedtester 2016-07-11 02:42:02 PDT
The reason it was placed in requiredCapabilities is that it is near impossible to check that the proxy settings are working the end user. Historically, if the proxy settings are there people are actually wanting them to be used or to fail.


Moving forward, I wonder if this is something that would be better suited in the like browser :{} capabilities at the top of the capabilities object.
Comment 2 User image juangj 2016-07-12 13:11:44 PDT
I'm not sure I understand that argument. If it's not possible to check that the settings are working, then how do you know whether the required capability was fulfilled? That seems equally impossible, regardless of the strength of the end user's desire.

There are a lot of tests in the wild that put proxy settings in the desired capabilities, even though they really mean to "require" the proxy. That could be out of unfamiliarity with the distinction, or because of a lack of local end support for required caps. It would be nice for those to keep working one way or another.
Comment 3 User image David Burns :automatedtester 2016-07-12 13:45:14 PDT
If the UA fails to set the proxy in a desiredCapabilities world, with errors from the UA, it will fail silently and in a requiredCapabilities world it would pass back those errors.
Comment 4 User image juangj 2016-07-12 15:03:27 PDT
The conclusion from IRC is that we don't actually return the "proxy" capability in the new session response. I thought we did, but that's not the case, so there isn't any way to indicate that the proxy capability was not fulfilled.
Comment 5 User image Andreas Tolfsen ‹:ato› 2016-07-12 16:59:40 PDT
I don’t think we should check if the proxy settings work when it is provided.  This feels like another case where the desired vs. required capability distinction doesn’t make any sense.  The purpose of capabilities is, primarily, to select a browser configuration from a matrix; not to filter at the driver level what features are enabled or not.  C.f. jgraham’s mail on the mailing list about shared browser configuration options.
Comment 6 User image Andreas Tolfsen ‹:ato› 2016-12-14 07:14:20 PST
Somewhat related to https://bugzilla.mozilla.org/show_bug.cgi?id=1323450.
Comment 7 User image Andreas Tolfsen ‹:ato› 2016-12-21 09:50:49 PST
I’ve started work on this.  Unfortunately I need to rewrite large portions of the capabilities processing steps to do this patch, but we needed to do that at some point anyway.

Note You need to log in before you can comment on or make changes to this bug.