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

23 Коммитов

Автор SHA1 Сообщение Дата
Andreas Tolfsen 69d406c698 Bug 1336214 - Preserve stacktraces in Marionette errors; r=maja_zf
Since bug 1326534 we have discarded the original stacktrace from errors
originating inside Marionette.  This was due to faulty logic when
attempting to generate a new stacktrace when it was missing from a
propagated error.

This change simplifies WebDriver errors by making use of Error
inheritance.  The WebDriver error specific functions error.toJson and
error.fromJson has additionally been moved to WebDriverError.

MozReview-Commit-ID: C3Ns0H01LyG

--HG--
extra : rebase_source : 0c705054dae8c0647500bb90e9b970cc57e712c4
2017-02-10 18:36:52 +00:00
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 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 cd049d0804 Bug 1245153 - Wrap errors before they are passed through the IPC channel; r=automatedtester
error.wrap acts as a no-op if it is passed a prototype which is already
of the WebDriverError prototypal chain.

MozReview-Commit-ID: Gd9kUEvsgNv

--HG--
extra : histedit_source : a6e620e3e4b6bfa4e1d77df48eaab59ffbc3cdce
extra : rebase_source : a94ae7fff63530a4cc4d1875bb4894657834ecb0
extra : commitid : HObqpKV7a9s
extra : source : d75ad1397656e43d22d0d69211df9fce3a667f0d
extra : intermediate-source : eff85dc0eaa9da4c4dff306cdb9a7474df29ccf1
2016-02-03 18:44:55 +00:00
Carsten "Tomcat" Book 33e27d2555 Backed out 18 changesets (bug 1245153) for multiple test failures
Backed out changeset 18d54b8d4ae8 (bug 1245153)
Backed out changeset 98b6d0c053c0 (bug 1245153)
Backed out changeset c29a348930a4 (bug 1245153)
Backed out changeset f79252e92acc (bug 1245153)
Backed out changeset 9f3f1c358e47 (bug 1245153)
Backed out changeset 3b9e9a027fa7 (bug 1245153)
Backed out changeset 6da8099573f3 (bug 1245153)
Backed out changeset 63a56310a1b5 (bug 1245153)
Backed out changeset 5fe42d498a2a (bug 1245153)
Backed out changeset b3be2d2f3ac1 (bug 1245153)
Backed out changeset ad5bf32d8fef (bug 1245153)
Backed out changeset 68a6dda373d2 (bug 1245153)
Backed out changeset 6ebd9fde50c0 (bug 1245153)
Backed out changeset e41a5b41859a (bug 1245153)
Backed out changeset 048d70070751 (bug 1245153)
Backed out changeset eff85dc0eaa9 (bug 1245153)
Backed out changeset dc6460e0f336 (bug 1245153)
Backed out changeset 36526a2e8b00 (bug 1245153)

--HG--
rename : testing/marionette/event.js => testing/marionette/EventUtils.js
rename : testing/marionette/action.js => testing/marionette/actions.js
rename : testing/marionette/atom.js => testing/marionette/atoms/atoms.js
rename : testing/marionette/element.js => testing/marionette/elements.js
rename : testing/marionette/frame.js => testing/marionette/frame-manager.js
rename : testing/marionette/interaction.js => testing/marionette/interactions.js
2016-02-11 17:05:41 +01:00
Andreas Tolfsen 55410ee72a Bug 1245153 - Wrap errors before they are passed through the IPC channel; r=automatedtester
error.wrap acts as a no-op if it is passed a prototype which is already
of the WebDriverError prototypal chain.

MozReview-Commit-ID: Gd9kUEvsgNv

--HG--
extra : commitid : HObqpKV7a9s
extra : rebase_source : c96b3c1a00a68a56d69d253945de5607039e3b49
extra : source : d75ad1397656e43d22d0d69211df9fce3a667f0d
extra : histedit_source : a6e620e3e4b6bfa4e1d77df48eaab59ffbc3cdce
2016-02-03 18:44:55 +00:00
Carsten "Tomcat" Book d07b3125f8 Backed out 16 changesets (bug 1245153) for mochitest test-bustage on a CLOSED TREE
Backed out changeset 30c8ec933737 (bug 1245153)
Backed out changeset 4c2b1902d7cd (bug 1245153)
Backed out changeset 1be5f60393a0 (bug 1245153)
Backed out changeset 22321e6b65e9 (bug 1245153)
Backed out changeset c1e0abbfa66e (bug 1245153)
Backed out changeset 80ae953819c8 (bug 1245153)
Backed out changeset 3edb67388ad6 (bug 1245153)
Backed out changeset 55f64197f6b5 (bug 1245153)
Backed out changeset 6bb93562a576 (bug 1245153)
Backed out changeset 5da7628c3767 (bug 1245153)
Backed out changeset bd41e4ab829d (bug 1245153)
Backed out changeset ee7ee24cc65e (bug 1245153)
Backed out changeset 4b2a5ee7199e (bug 1245153)
Backed out changeset d75ad1397656 (bug 1245153)
Backed out changeset 1f5e37f8e446 (bug 1245153)
Backed out changeset aec0a0166685 (bug 1245153)

--HG--
rename : testing/marionette/event.js => testing/marionette/EventUtils.js
rename : testing/marionette/action.js => testing/marionette/actions.js
rename : testing/marionette/atom.js => testing/marionette/atoms/atoms.js
rename : testing/marionette/element.js => testing/marionette/elements.js
rename : testing/marionette/frame.js => testing/marionette/frame-manager.js
rename : testing/marionette/interaction.js => testing/marionette/interactions.js
extra : rebase_source : 11bba1116e87ed79fa72f24ff41216a6e3fb00d6
2016-02-05 14:18:19 +01:00
Andreas Tolfsen 243232cb77 Bug 1245153 - Wrap errors before they are passed through the IPC channel; r=automatedtester
error.wrap acts as a no-op if it is passed a prototype which is already
of the WebDriverError prototypal chain.

--HG--
extra : commitid : HObqpKV7a9s
extra : rebase_source : 04b8d3d9f1ebb563b2258231e3d34f9c1c2883ae
extra : histedit_source : a6e620e3e4b6bfa4e1d77df48eaab59ffbc3cdce
2016-02-03 18:44:55 +00:00
Andreas Tolfsen b6fcf96be2 Bug 1243704 - Serialise errors sent over IPC; r=automatedtester
This fixes an instance of passing an Error prototype over the message
manager as a CPOW.  We solve this by marshaling the error, which is
now done automatically by the new AsyncMessageChannel.  It allows us to
create an (almost) transparent promise-based interface between chrome-
and content contexts.

The patch also makes AsyncMessageChannel reusable on both sides of the
message listener, but it's currently not used at its maximum potential
because of the way the listener is architected.

--HG--
extra : commitid : EQd5E4Digdv
extra : rebase_source : 8e0c36960759d25c73bbbc0f4f0bcb453c1028f4
extra : amend_source : 6bb6a76a8b30a5524639f8236291980b16402e6a
2016-01-29 12:57:46 +00:00
Andreas Tolfsen c2d519ab45 Bug 1153828 - Merge message listeners in AsyncContentSender; r=automatedtester
This change reduces the number of content frame script message senders
from three to one by imposing a message format.

--HG--
extra : rebase_source : 2e2940eb7d095e22a60d3e6f3af44446bb425c93
2016-01-21 19:27:23 +00:00
Andreas Tolfsen 3ddc4dcff5 Bug 1223907: Refactor cookies in Marionette
Moves most of the cookie implementation to a new file,
testing/marionette/cookies.js.  The new Cookies class encapsulates all
APIs for manipulating and querying cookies from content space.

It communicates with chrome space, where the cookie manager lives, through
a new SyncContentSender provided by testing/marionette/proxy.js.  This new
interface provides synchronous and transparent communication from content
to chrome, not dissimilar from how the original listener proxy works.

r=dburns

--HG--
extra : commitid : 7jF7OFSx4Yk
extra : rebase_source : 8fc73fb59196f8076e85673d002c42e2ae458ad0
2015-11-13 13:35:22 +00:00
Andreas Tolfsen dac05c8fbd Bug 1223028: Exhaust server-originated commands
The Python client does not currently exhaust all the command
requests originating from the server as pointed out by :bhsu in
https://bugzilla.mozilla.org/show_bug.cgi?id=1211503#c12.

This prevents making multiple calls to runEmulatorCmd and runEmulatorShell
inside executeScript/executeJSScript/executeAsyncScript.  This failure
makes marionette-webapi fail.

We loop through all the commands originating from the server until we
get sent back a response.

r=dburns

--HG--
extra : commitid : 1SVHwcJrDcU
2015-11-09 15:54:10 +00:00
Andreas Tolfsen 22ca8dbc18 Backed out changeset a3f9ac7c8454 (bug 1223028)
CLOSED TREE

--HG--
extra : commitid : 1bAUklMyy5l
extra : amend_source : 93e1e088fe70a510b51b27bdf8380ef577daf946
2015-11-10 22:47:17 +00:00
Andreas Tolfsen 942d6c9426 Bug 1223028: Exhaust server-originated commands
The Python client does not currently exhaust all the command
requests originating from the server as pointed out by :bhsu in
https://bugzilla.mozilla.org/show_bug.cgi?id=1211503#c12.

This prevents making multiple calls to runEmulatorCmd and runEmulatorShell
inside executeScript/executeJSScript/executeAsyncScript.  This failure
makes marionette-webapi fail.

We loop through all the commands originating from the server until we
get sent back a response.

r=dburns

--HG--
extra : commitid : 8oBRRddi4TJ
extra : rebase_source : 98b10ccaba525acd391bf614a91aec1b8f7daf4e
2015-11-09 15:54:10 +00:00
Carsten "Tomcat" Book 08997000eb Backed out 2 changesets (bug 1202902) to recking bug 1202902 to be able to reopen inbound on a CLOSED TREE
Backed out changeset 647025383676 (bug 1202902)
Backed out changeset d70c7fe532c6 (bug 1202902)
2015-10-07 14:03:21 +02:00
Carsten "Tomcat" Book e7ef778c9d Backed out 1 changesets (bug 1202902) for causing merge conflicts to mozilla-central
Backed out changeset cfc1820361f5 (bug 1202902)

--HG--
extra : rebase_source : 5d3db72337754bc7ab0ed0c30b2896100411ff92
2015-10-07 12:13:45 +02:00
Shu-yu Guo d06b6030f6 Bug 1202902 - Scripted fix the world. 2015-10-06 14:00:31 -07:00
Chris Manchester cc73ee6143 Bug 1185486 - Part 2: Prevent message listeners from a failed command from causing an out of order response when a content command hangs. r=ato
--HG--
extra : commitid : 9x2P0ubHLCZ
2015-09-25 07:33:11 -07:00
Shu-yu Guo 64db2267cf Bug 1202902 - Mass replace toplevel 'let' with 'var' in preparation for global lexical scope. (rs=jorendorff) 2015-09-15 11:19:45 -07:00
Andreas Tolfsen 135734ed2d Bug 1159238. Generate UUID internally to ContentSender
r=dburns

--HG--
extra : source : e24c86fa5a8c5abb6b51662b0f44b4bab480b1ed
2015-04-28 18:15:08 +01:00
Andreas Tolfsen 89570930a6 Bug 1159219: Make ContentSender a separate module
r=dburns

--HG--
extra : rebase_source : dd217232c478e94673ee416dd1d19ae5f37bce2a
extra : source : a0fa5dabf485fd6860e4dd150158f59da2ca6692
2015-04-28 14:25:37 +01:00