Граф коммитов

9 Коммитов

Автор SHA1 Сообщение Дата
Thomas Charles acf2f9d4dd Bug 1316975 - Correct function definition style in Marionette components; r=ato
No functional changes.

MozReview-Commit-ID: 25cWAnpRB9H

--HG--
extra : rebase_source : c8b14bf47a476488568f54d3640b51bbeed5b04b
2016-12-04 12:42:52 +01:00
Andreas Tolfsen 4ca4faa8a6 Bug 1297551 - Avoid cancelling content timeout callback; r=automatedtester
We need to avoid passing the timeout ID returned from `setTimeout` in the
content frame script that we use to register the script timeout handler
to the sandbox's `clearTimeout` function as this might interfere with any
`window.setTimeout` calls being made in the injected script.

MozReview-Commit-ID: 26PY8JDkf9A

--HG--
extra : rebase_source : 414581472dfa99379aecdfea5c5a29c2ce808890
2016-11-25 17:01:16 +00:00
Andreas Tolfsen 7bc1cc3ef5 Bug 1290966 - Remove callback function argument from sync scripts; r=automatedtester
MozReview-Commit-ID: CaDSYA5PNFp

--HG--
extra : rebase_source : 1d85bd860359d511c58b546d19037a989196a43e
2016-08-04 18:20:18 +01:00
Andreas Tolfsen a925942b81 Bug 1290966 - Permit introspection into arguments; r=automatedtester
The callback function available to asynchronously evaluated scripts is
defined in a privileged content frame script, and is thus not readable
or introspectable in a sandboxed content script.  Attempting this will
yield a "Permission denied to access property" error.

To circumvent this problem we "hide" the callback function by wrapping
it before pushing it on the arguments object that is applied to the
injected script.

This allows introspection into the _immediate_ elements on the arguments
object available to executed scripts.

MozReview-Commit-ID: 9ZigPNYcYpf

--HG--
extra : rebase_source : 64e71886100f65dbd93f4857615f256edf4fc050
2016-08-02 14:50:59 +01:00
Henrik Skupin a3814775bf Bug 1271758 - Ensure that execute_script does not fail on closed chrome windows. r=ato
MozReview-Commit-ID: 7SMV36KuFCe

--HG--
extra : rebase_source : a15078b9f40c845945fbd6061cac0711a792e342
2016-05-11 22:10:51 +02:00
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
Wes Kocher 6586a41d87 Backed out changeset 08754cfc737c (bug 1123506) for various test bustage due to ` JavascriptException: JavascriptException: ReferenceError: __marionetteParams is not defined` CLOSED TREE 2016-05-06 15:12:14 -07:00
Andreas Tolfsen 2b77034fa3 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

--HG--
extra : rebase_source : 38cc7b1e374fd42afb213133fd1a5e11bf8bdd95
2016-02-26 14:36:39 +00:00
Andreas Tolfsen 278e4c6847 Bug 1251701 - Store imported scripts in memory; r=jgriffin
This bug is also a dependency for scheduling Mn-e10s tests on Windows 7
(bug 1251351).

MozReview-Commit-ID: 2jE4C99d1MX

--HG--
extra : rebase_source : 96c9fad49538fdadcc8f001aeef5926e82419001
2016-02-29 18:52:30 +00:00