Then and ThenPromise can now be given only one function object, which takes a
`const MozPromise::ResolveOrRejectValue&`.
MozReview-Commit-ID: BEtc3spK9Yh
--HG--
extra : rebase_source : 1b16ad15ebfcdfb653d8d98073adee0f8b27b46e
Removed 'virtual' from overrides, as per coding guidelines.
Fixed some incorrect indentations, and inconsistencies.
MozReview-Commit-ID: 4kNVgoDljG3
--HG--
extra : rebase_source : 7b25abacc7cfc1a6898963bc58120204c70bee45
Fix code generation for armv7 devices without neon by switching
official builds to the 1.15 beta rust compiler. This fixes the
target generation (and standard library image) to not assume
neon is available, per Google's NDK guidelines.
We expect to update this to 1.15.0 stable before release.
MozReview-Commit-ID: HWJLLGJaUDY
--HG--
extra : rebase_source : 53f00f34f40bb2adb07de27e05019ef0159f5ec8
Dumping symbols can interfere with staging cppunittests in case calling
objcopy from the symbol dumping script coincides exactly with calling
objcopy when staging cppunittests when the two are run in parallel. This
patch prevents symbol dumping from happening while tests are being packaged.
MozReview-Commit-ID: Hgi1zyIZE7K
--HG--
extra : rebase_source : 5fac1ff8aeacde38e27ca0ca7f33ed9a594dc06b
(Before we introduced async/await in this test, some of these needed to be
global, because they were used in several callbacks.)
MozReview-Commit-ID: 7mDzmUx1jQ
--HG--
extra : rebase_source : 6f3a2f58c8abc643b09258b54141d93658183519
Capabilities are sent to the content frame script as a JSON blob.
We can re-parse that in the listener to make use of the same complex
object representation there.
Because the listener is comprised of a set of top-level functions and
not an object prototype, we cannot reuse the same pointer/getter trick
as in testing/marionette/driver.js. However, we can change this later
when we do introduce more robust code organisation to this file.
MozReview-Commit-ID: 7PpholLqtF
--HG--
extra : rebase_source : 93b94678ac2184255b1c708103eb5cf44f9d2266
This change resets the session ID after all other state has been cleared,
and also reinitialises `GeckoDriver#sessionCapabilities`, which was not
done before.
MozReview-Commit-ID: Jb40CXuX8h1
--HG--
extra : rebase_source : 226875ea929f0e7e471fe58499f76313fc60947e
This change removes session capability processing
from testing/marionette/driver.js and replaces it with
testing/marionette/session.js and `session.Capabilities`.
Session timeout durations used to be stored in properties
exposed directly on the `GeckoDriver` prototype, but these are now
represented by `GeckoDriver#timeouts`, which is a pointer (getter) of
`GeckoDriver#sessionCapabilities#timeouts`. The same is true for other
session-scoped state.
Since capabilities parsing is not unique to starting a new session,
the errors thrown by `session.Capabilities.fromJSON` are re-thrown
in `GeckoDriver#newSession` since it is required that we return a
`SessionNotCreatedError` on parsing them during session creation.
MozReview-Commit-ID: I3Xu2v71n4S
--HG--
extra : rebase_source : 40cef31adf238bef021a7c7c2713016a34f35920
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
Capabilities should be sent in either a `desiredCapabilities` or a
`requiredCapabilities` block inside `capabilities`:
{capabilities: {requiredCapabilities: {acceptInsecureCerts: true}}}
Marionette currently accepts capabilities in the top-level dictionary,
but this is not conforming to the WebDriver.
MozReview-Commit-ID: 9JWjvPKBp6S
--HG--
extra : rebase_source : 88a12dcba275d6eedc5640bd3a0033b6dbd1d86d
When we currently create new WebDriver errors we throw away the stacktrace
generated by `WebDriverError`'s prototype, `Error`. This change stores
the stacktrace, which will cause it to be serialised and returned to
the client.
This change is not as valuable as storing the stacktraces of internal
errors, but brings symmetry to our error handling and may be useful if
only to navigate to the source of an error.
MozReview-Commit-ID: LCFMwKxxcTp
--HG--
extra : rebase_source : 56947805f29000a64c2daef0fd774ea90330c09e
The implementation of the new library function `assert.in` is analogous
to Python's `unittest.TestCase.assertIn`.
MozReview-Commit-ID: 1pjS9ttPXgo
--HG--
extra : rebase_source : 3f4121226d65f127fdf0c990915483659f3a7f93
The `stack` argument to `WebDriverError` has never been in use. Following
the API of the `Error` prototype, this changes its constructor to take
one argument which can either be a string of an `Error`.
When internal errors are thrown in Marionette, they are usually
wrapped in `WebDriverError` but we currently lose track of its stack.
This preserves the wrapped error's stacktrace by setting the `stack`
property. Practice have found that they are very useful to return to
the client, as they are currently only printed to stdout.
MozReview-Commit-ID: 9sTdP4TntIc
--HG--
extra : rebase_source : f14197a1c8700215ce3d0edc7078c9f568b80ec4
Calling `typeof` on arrays or null in JavaScript returns `"object"`,
and a safer check is to rely on `Object.prototype.toString`.
MozReview-Commit-ID: 5VxXf2ByoEx
--HG--
extra : rebase_source : 4d1fe95a75343964836e670d0ceffa6ce680e390
mask-*-1a.html: test cases for indirect mask painting.(nsDisplayMask::PaintAsLayer)
mask-*-1b.html: test cases for painting mask on mask layer.(nsDisplayMask::PaintMask)
MozReview-Commit-ID: K9BK4MlnpBE
--HG--
extra : rebase_source : 968bc221e28cd9c60927526ee719c0ceffeeab18