mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 21:35:39 +00:00
c276b917c4
This patch provides a (nearly) WebDriver conforming implementation of capabilities in Marionette. The work remaining is pending further clarification in the specification. Capabilities are represented internally as a complex object provided by `session.Capabilities`. Timeouts and proxy configuration are also represented by the similar complex objects `session.Timeouts` and `session.Proxy`, respectively. The capabilities stored in `GeckoDriver#sessionCapabilities` are the result of parsing user-provided desired- and required capabilities. WebDriver now uses `firstMatch` and `alwaysMatch` primitives for capabilities, but as this is considered a wider breaking change, the move to these primitives will be done at a later stage. It’s prudent to point out that the base techniques used with the new primitives are similar to those implemented for `desiredCapabilities` and `requiredCapabilities` in this patch, and that the work needed to adapt them is considered trivial. When capabilities are presented back to the user (the so called processed capabilities), we call the `toJSON` implementation on the complex objects. `session.Capabilities#toJSON` calls the internal function `marshal` which ensures empty fields are dropped. `marshal` can be considered to be a specialisation of the standard library `JSON.stringify`, which also calls `toJSON` on entry values if they provide this function. The changeset overall also provides a much deeper level of testing of WebDriver capabilities. MozReview-Commit-ID: 97xGt3cnMys --HG-- extra : rebase_source : 98e0bde3fdfd811775d195b488cb1255f61e5772
17 lines
407 B
INI
17 lines
407 B
INI
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
# xpcshell unit tests for Marionette
|
|
|
|
[DEFAULT]
|
|
skip-if = appname == "thunderbird"
|
|
|
|
[test_action.js]
|
|
[test_assert.js]
|
|
[test_element.js]
|
|
[test_error.js]
|
|
[test_message.js]
|
|
[test_navigate.js]
|
|
[test_session.js]
|