gecko-dev/testing/marionette/client
Andreas Tolfsen 1d15796afc Bug 1123506 - Evaluate scripts in content with lasting side-effects; r=automatedtester
In order to achieve WebDriver parity, Marionette needs the ability to
evaluate scripts in content space with lasting side-effects.  This means
that state modifications should affect behaviour and state of the browsing
context, and such transgress the boundaries of the sandbox.

This patch brings a new script evaluation module that is shared between
code in chrome- and content space.  This brings the number of unique
script evaluation implementations in Marionette down from six to one.

evaluate.sandbox provides the main entry-point for execution.  It is
compatible with existing Marionette uses of Execute Script and Execute
Async Script commands in Mozilla clients, but also provides a new stateful
sandbox for evaluation that should have lasting side-effects.

It is not expected that Mozilla clients, such as testing/marionette/client
and the Node.js client in Gaia, should have to change as a consequence
of this change.

A substantial change to the script's runtime environment is that many
globals that previously existed are now only exposed whenever needed.
This means for example that Simple Test harness functionality (waitFor,
ok, isnot, is, &c.) is only available when using a sandbox augmented
with a Simple Test harness adapter.

Conversely, this patch does not expose marionetteScriptFinished as a
callback to asynchronous scripts for sandboxes which sandboxName parameter
is undefined, because this is what determines if the script should be
evaluated under WebDriver conformance constraints.  In all other cases
where sandboxName _is_ defined, the traditional marionetteScriptFinished
et al. runtime environment is preserved.

MozReview-Commit-ID: 8FZ6rNVImuC
2016-05-09 16:08:17 +01:00
..
marionette_driver Bug 1123506 - Evaluate scripts in content with lasting side-effects; r=automatedtester 2016-05-09 16:08:17 +01:00
MANIFEST.in Bug 1246407 - Rename parent directories for Marionette client and test harness; r=automatedtester 2016-02-06 17:34:10 +00:00
requirements.txt Bug 1246407 - Rename parent directories for Marionette client and test harness; r=automatedtester 2016-02-06 17:34:10 +00:00
setup.py Bug 1246407 - Rename parent directories for Marionette client and test harness; r=automatedtester 2016-02-06 17:34:10 +00:00