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

11 Коммитов

Автор SHA1 Сообщение Дата
Andreas Tolfsen c8087a4a76 Bug 1403577 - Rename TYPE identifier to Type. r=whimboo
MozReview-Commit-ID: KqN7GPnI288

--HG--
extra : rebase_source : cd8863e33ba365f975a3492d2763861289b2e0bb
2017-09-30 18:28:32 +01:00
Andreas Tolfsen 3077e8cfec Bug 1403577 - Associate message origin enum with Message type. r=whimboo
The MessageOrigin enum is removed as a separate type and
exposed as Message.Origin.  The enum variants can be accessed as
Message.Origin.Client and Message.Origin.Server.

MozReview-Commit-ID: 1caPthSMIWx

--HG--
extra : rebase_source : 2e59d77e22ad1a35a072005131b45a4cfc8851a5
2017-09-30 18:13:23 +01:00
Andreas Tolfsen f9fbf15007 Bug 1403577 - Rename toMsg/fromMsg to toPacket/fromPacket. r=whimboo
MozReview-Commit-ID: 3adU2xTHo1X

--HG--
extra : rebase_source : bd400cb879bfb54b78d87b733ef0610f538674f4
2017-09-30 18:10:39 +01:00
Andreas Tolfsen 3e5326f9db Bug 1362992 - Wrap implementation errors as UnknownError r=automatedtester
JavaScript errors that arise from the Marionette implementation are
currently wrapped as WebDriverErrors.  A WebDriverError is encoded with
a "webdriver error" error code, which officially does not exist in the
WebDriver specification.

To distinguish WebDriver errors from programming errors of Marionette,
this changes them to be encoded as UnknownErrors (error code
"unknown error").  This will make stacktraces coming from clients
easier to read, since it is clear that the error is not caught by the
WebDriverError-catchall.

MozReview-Commit-ID: A5HejTOgOp8

--HG--
extra : rebase_source : 7bd4f539954dd11973b2bd16c1bf4f4ea7b4a4d7
2017-05-08 14:01:30 +01:00
Andreas Tolfsen 24fba2b89e Bug 1337743 - More data validation checks for Marionette messages; r=whimboo
This change introduces more data validation checks on unmarshaling
Marionette protocol messages.  Specifically, validation of
message.Command's and message.Response's constructor arguments and packet
contents in their respective fromMsg functions are tested.

Doing these tests ensures more safety further down the pipeline with
respect to the data integrity in Marionette commands.

MozReview-Commit-ID: BxYipX5zfo9

--HG--
extra : rebase_source : 5cd9edab8801323b19688f871ba78ccf70a05c5e
2017-02-09 18:22:09 +00:00
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
Andreas Tolfsen a35ff231b0 Bug 1326534 - Preserve stacks when passing error protos to WebDriverError; r=automatedtester
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
2016-12-30 11:26:30 +00:00
Andreas Tolfsen c5255475ef Bug 1253677 - Remove run_test functions from xpcshell tests; r=automatedtester
These functions do nothing.

MozReview-Commit-ID: 6AiXA8zEbv2

--HG--
extra : rebase_source : a01266752baba31712eb05b80cd8431326dbce9e
2016-03-04 18:25:21 +00:00
Andreas Tolfsen 578011d7a7 Bug 1239373 - Tests for testing/marionette/message.js; r=automatedtester
--HG--
extra : rebase_source : 0c1907b6558e079fd4b666e461b55ba2d6d3ed72
extra : source : cb00c71c2123fa2ee48694f4cf276ea8c3902e9c
2016-01-18 18:39:21 +00:00
Nigel Babu e806014c5e Backed out 3 changesets (bug 1239373) for xpcshell bustage on emulator
Backed out changeset 308b5e2bb5df (bug 1239373)
Backed out changeset 783077fc10a2 (bug 1239373)
Backed out changeset 32e6e21daeda (bug 1239373)

--HG--
extra : commitid : FRAHnToBmu7
2016-01-19 13:16:37 +05:30
Andreas Tolfsen 32c9e1797b Bug 1239373 - Tests for testing/marionette/message.js; r=automatedtester
--HG--
extra : rebase_source : deb18863725dcafd002061713467ff188f1d1aeb
2016-01-18 18:39:21 +00:00