Closed Bug 1174941 Opened 4 years ago Closed 4 years ago

Update marionette capabilities handling to match the spec.

Categories

(Testing :: Marionette, defect)

defect
Not set

Tracking

(firefox41 fixed)

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: automatedtester, Assigned: automatedtester)

References

()

Details

(Keywords: pi-marionette-server, pi-marionette-spec)

Attachments

(3 files, 1 obsolete file)

No description provided.
Assignee: nobody → dburns
Blocks: 1165449
Bug 1174941: Update server capabilities that are set on startup; r?ato
Attachment #8624214 - Flags: review?(ato)
Bug 1174941: Remove any keys from desired capabilites if in required capabilities and correct error return type; r?ato

Loop through the capabilities and remove any duplicates from desired capabilities
if the same key has been found in requiredCapabilities.

The return type of errors is now an array instead of an object with keys.
Attachment #8624215 - Flags: review?(ato)
Bug 1174941: Update conditional to switch statement to allow more processing of capabilities; r?ato
Attachment #8624216 - Flags: review?(ato)
Bug 1174941: Remove all capabilities from desired capabilities if they are in the session capabilities; r?ato
Attachment #8624217 - Flags: review?(ato)
Can you do a try run on Gij and Gip as well?
Flags: needinfo?(dburns)
Attachment #8624214 - Flags: review?(ato)
Comment on attachment 8624214 [details]
MozReview Request: Bug 1174941: Update server capabilities that are set on startup; r?ato

https://reviewboard.mozilla.org/r/11659/#review10095

::: testing/marionette/driver.js:146
(Diff revision 1)
> -    "handlesAlerts": false,
> +    "handlesAlerts": true,

The spec doesn’t say that alert handling is a capability, it assumes that all implementations support it.
Comment on attachment 8624215 [details]
MozReview Request: Bug 1174941: Remove all capabilities from desired capabilities if they are in the session capabilitiesand in requiredCapabilities; r?ato

https://reviewboard.mozilla.org/r/11661/#review10097

::: testing/marionette/driver.js:625
(Diff revision 1)
> -                this.sessionCapabilities[caps];
> +                this.sessionCapabilities[caps])   ;

Remove tab before semicolon

::: testing/marionette/driver.js:610
(Diff revision 1)
> +    if (from !== null) {

Will from actually ever be `null` exactly?

::: testing/marionette/driver.js:612
(Diff revision 1)
> +        if (from.desiredCapabilities && from.desiredCapabilities[cap]) {

You can skip this whole loop altogether if `typeof from.desiredCapabilities == "undefined"`.
Attachment #8624215 - Flags: review?(ato)
Comment on attachment 8624216 [details]
MozReview Request: Bug 1174941: Update conditional to switch statement to allow more processing of capabilities; r?ato

https://reviewboard.mozilla.org/r/11663/#review10099

Ship It!
Attachment #8624216 - Flags: review?(ato) → review+
Attachment #8624217 - Flags: review?(ato)
Comment on attachment 8624217 [details]
MozReview Request: Bug 1174941: Remove all capabilities from desired capabilities if they are in the session capabilities; r?ato

https://reviewboard.mozilla.org/r/11665/#review10101

::: testing/marionette/driver.js:616
(Diff revision 1)
> +        if (from.desiredCapabilities && from.desiredCapabilities[cap]) {

If `from.desiredCapabilities` is undefined you can skip the loop over `this.sessionCapabilities`.
Comment on attachment 8624214 [details]
MozReview Request: Bug 1174941: Update server capabilities that are set on startup; r?ato

Bug 1174941: Update server capabilities that are set on startup; r?ato
Attachment #8624214 - Flags: review?(ato)
Attachment #8624215 - Attachment description: MozReview Request: Bug 1174941: Remove any keys from desired capabilites if in required capabilities and correct error return type; r?ato → MozReview Request: Bug 1174941: Remove all capabilities from desired capabilities if they are in the session capabilitiesand in requiredCapabilities; r?ato
Attachment #8624215 - Flags: review?(ato)
Comment on attachment 8624215 [details]
MozReview Request: Bug 1174941: Remove all capabilities from desired capabilities if they are in the session capabilitiesand in requiredCapabilities; r?ato

Bug 1174941: Remove all capabilities from desired capabilities if they are in the session capabilitiesand in requiredCapabilities; r?ato
Comment on attachment 8624216 [details]
MozReview Request: Bug 1174941: Update conditional to switch statement to allow more processing of capabilities; r?ato

Bug 1174941: Update conditional to switch statement to allow more processing of capabilities; r?ato
Attachment #8624216 - Flags: review+ → review?(ato)
Attachment #8624217 - Attachment is obsolete: true
Attachment #8624214 - Flags: review?(ato) → review+
Comment on attachment 8624214 [details]
MozReview Request: Bug 1174941: Update server capabilities that are set on startup; r?ato

https://reviewboard.mozilla.org/r/11659/#review10189

Ship It!
Comment on attachment 8624216 [details]
MozReview Request: Bug 1174941: Update conditional to switch statement to allow more processing of capabilities; r?ato

https://reviewboard.mozilla.org/r/11663/#review10191

Ship It!
Attachment #8624216 - Flags: review?(ato) → review+
Attachment #8624215 - Flags: review?(ato) → review+
Comment on attachment 8624215 [details]
MozReview Request: Bug 1174941: Remove all capabilities from desired capabilities if they are in the session capabilitiesand in requiredCapabilities; r?ato

https://reviewboard.mozilla.org/r/11661/#review10193

Ship It!
Flags: needinfo?(dburns)
You need to log in before you can comment on or make changes to this bug.