Closed jugglinmike closed 1 year ago
As written today (that is, before applying this patch), "process capabilities" and "match capabilities" are incoherent. "process capabilities" may invoke "match capabilities" with a value of null, to which the latter attempts to apply the "iterate" algorithm for ordered maps.
This occurs if either of the following conditions is met:
Since "process capabilities" was modeled after an algorithm of the same name in the WebDriver specification, and since I'm not aware of any reason to diverge, I designed this patch to resolve the incoherency by mimicking the behavior in WebDriver. That is: when the "session.new" command is invoked without any specified capabilities, then the session is created successfully.
With this patch applied, "process capabilities" always invokes "match capabilities" with a map, though the map may be empty. "match capabilities" continues to tolerate empty maps.
Thanks, @jkva!
Correct the derivation of "required capabilities" and simplify the return value.
Preview | Diff