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

79 Коммитов

Автор SHA1 Сообщение Дата
Andreas Tolfsen de001d80b7 Bug 1376128 - Lint testing/marionette; r=automatedtester
MozReview-Commit-ID: DY4yCSBEZrN

--HG--
extra : rebase_source : d4e25369418cc72a6ee9f78d44b050a87403391d
2017-06-29 16:40:24 -07:00
Andreas Tolfsen ee51d983c0 Bug 1376128 - Use named options for JavaScriptError; r=automatedtester
Using the {foo = null} = {} shorthand to generate default values exposed
as function scope variables is more readable, and arguably somewhat safer,
than the current approach.

MozReview-Commit-ID: Lxn0fpBSR3a

--HG--
extra : rebase_source : 63fa829657d726e8987a77b5add817a3b7d0b7d3
2017-06-28 11:24:58 -07:00
Andreas Tolfsen ed364ef1d6 Bug 1376128 - Avoid use of proprietary catch-if statement; r=automatedtester
Whilst try...catch (e if foo) { ... } is a very nice construct, it has
not been standardised and we should avoid using non-web platform features.

MozReview-Commit-ID: 9qzHtBdlPfw

--HG--
extra : rebase_source : be27a3d647eba2d48721c77dabe12ca13278bda9
2017-06-28 11:22:29 -07:00
Andreas Tolfsen 54c2f296a7 Bug 1376128 - Use selective imports from error module; r=automatedtester
Instead of importing everything from the testing/marionette/error.js
module into the global scope, we need to be selective about what symbols
we want.

MozReview-Commit-ID: HZDAS0bs0GD

--HG--
extra : rebase_source : 14a300bb2cedc0716168d50846755a6faed83012
2017-06-28 11:01:49 -07:00
Andreas Tolfsen 3802e2befd Bug 1373218 - Add invalid cookie domain error to status lookup; r=automatedtester
The InvalidCookieDomainError type is missing a status lookup key in
testing/marionette/error.js.  This adds "invalid cookie domain" as a
reverse lookup for the type.

MozReview-Commit-ID: 69hkk28axtt

--HG--
extra : rebase_source : 19628df79d89f7fbaf821cc1847e1be241ff56af
2017-06-15 13:36:47 +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
David Burns 26b4a70a73 Bug 1362990: Implement InvalidCookieDomainError in Marionette; r=ato
This implements the error Invalid Cookie Domain as described in
https://w3c.github.io/webdriver/webdriver-spec.html#dfn-invalid-cookie-domain
which is used in the Marionette Cookie Handling code.

MozReview-Commit-ID: EA8Zb03QcMo

--HG--
extra : rebase_source : 2084427475643e2be264cb90c13d674a18eb0bed
2017-05-08 17:08:41 +01:00
Andreas Tolfsen 0c61ad5319 Bug 1359050 - Test element in view with pointer events enabled; r=maja_zf
This change makes it possible to click elements that has its
pointer-events style property set to "none".

If an element has its style property pointer-events set to "none",
the element in view test will fail due to document.elementsFromPoint
excluding it due to non-interactability.  This is only a problem when
checking if the element is inside the viewport, and not when actually
performing interaction with the element.

The relevant specification change is
ba6ee925b5.

MozReview-Commit-ID: JwZB6fm7P9A

--HG--
extra : rebase_source : 18ddf7955c7e0bc6d1d7f798aebc6e09799a99ca
2017-04-17 19:34:44 +01:00
Andreas Tolfsen 9d9b0dba43 Bug 1359004 - Add preliminary support for unexpected alerts r=whimboo
Add preliminary support for returning unexpected alert open errors when
calling commands that require it according to the WebDriver standard.

Also fixes a faulty test that seems to believe it is fine to click an
element whilst an alert is present.

Further work needs to be done on user prompts, asserts, and the handler
for user prompts in https://bugzilla.mozilla.org/show_bug.cgi?id=1264259.

MozReview-Commit-ID: BiWURoQECji

--HG--
extra : rebase_source : caa1506a0e972c7ad0da2d31993fb0b8ecc1ee17
2017-04-20 18:00:46 +01:00
Andreas Tolfsen 18c977b6ec Bug 1337743 - Document misuse of instanceof in Marionette; r=whimboo
MozReview-Commit-ID: IbUyQd0xCAI

--HG--
extra : rebase_source : 5f4298e2951d9a606ad85e145771570b84b2e3d7
2017-02-14 16:48:14 +00:00
Andreas Tolfsen 493bce4e65 Bug 1333014 - Pretty-print HTML elements; r=maja_zf
When passing a DOM element that is an HTML element to error.pprint,
it will get pretty-printed with its ID and class properties.

This helps to identify elements when one is obscuring the other when
clicking. For example, the error message

	Element <input id="foo"> is obscured by <input id="bar">

is nicer than the old error message

	Element [object HTMLElement] {} is obscured by [object HTMLElement] {}

MozReview-Commit-ID: 8U2Lo8V4lmv

--HG--
extra : rebase_source : a0a0176f1fed9786da6260e27d28c23c8eb2a944
2017-02-07 16:59:59 +00:00
Andreas Tolfsen 7fbc7c7a97 Bug 1333014 - Align element interaction errors with spec; r=whimboo
This renames the ElementNotVisibleError to ElementNotInteractableError,
and adds a new ElementClickInterceptedError.

MozReview-Commit-ID: 6cjVghUCvyv

--HG--
extra : rebase_source : 3f2105c1f631ac4776e231bb6c88a00e26f1ae6c
2017-02-03 19:30:13 +00:00
Maja Frydrychowicz ecc7405607 Bug 1337133 - Add MoveTargetOutOfBoundsError as a new Webdriver error type; r=ato+446296
To be used in dispatch of pointerMove action.

MozReview-Commit-ID: I9wPAKaoA47

--HG--
extra : rebase_source : 995b6de0fea25c3850720f10bd585510c78bf71f
2017-02-17 14:52:58 -05: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 d9976f6943 Bug 1336214 - Use static lookup of errors; r=maja_zf
To avoid errors from being needlessly constructed on starting the
Marionette server, this changes testing/marionette/error.js to use a
static lookup table for error status codes.

This also provides some added security since individual custom errors
may have specific constructor logic that would cause an error to throw
an error if the correct arguments were not provided, and we cannot
guarantee that we provide the right ones generically when loading in
the error module.

MozReview-Commit-ID: 1sejpNzsjJp

--HG--
extra : rebase_source : 1d57c56675d5a374bc97c463898e7b5ed77ef7b8
2017-02-10 18:33:37 +00:00
Andreas Tolfsen 83a0a41c92 Bug 1336214 - Remove duplicate error.wrap; r=maja_zf
MozReview-Commit-ID: KC6ByTiyhre

--HG--
extra : rebase_source : e4c878243d13d62c88e6ebbc8ec027ea76337ad5
2017-02-09 19:28:30 +00:00
Andreas Tolfsen b2889c31fc Bug 1326534 - Propagate stacktraces for WebDriver errors; r=automatedtester
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
2016-12-30 13:07:54 +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
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 9ac8f3690e Bug 1103196 - Add insecure certificate error; r=automatedtester
MozReview-Commit-ID: 26wwOuqWhog

--HG--
extra : rebase_source : ad5cd93e9360545932e9cd05f4efdbc9aa8f2712
2016-11-06 18:00:18 +00:00
Sebastian Hengst 42f8e73f86 Backed out changeset 0c28b77a3279 (bug 1103196) 2016-11-25 00:18:27 +01:00
Andreas Tolfsen e19e26382e Bug 1103196 - Add insecure certificate error; r=automatedtester
MozReview-Commit-ID: 26wwOuqWhog

--HG--
extra : rebase_source : 2a071ca7800f27026c8c53efb1b247067c37a90e
2016-11-06 18:00:18 +00:00
Andreas Tolfsen e5010028a2 Bug 1313865 - Centralise common Marionette assertions; r=automatedtester,maja_zf
Many tests that result in throwing errors, amongst those many type-
and platform checks, are repeated throughout the Marionette code base.
This patch centralises the most common of these, typically reducing
consumer calls from three to one line.

Example usage:

	assert.defined(cmd.parameters.value);
	assert.postiveInteger(cmd.parameters.value,
	    error.pprint`Expected 'value' (${value}) to be a signed integer`);
	// InvalidArgumentError: Expected 'value' ([object Object] {"foo": "bar"}) to be a positive integer

MozReview-Commit-ID: BHOaDazeGer

--HG--
extra : rebase_source : 1d35c10e29d4fd536829e9714ae65bcd14ad21f8
2016-10-31 22:00:21 +00:00
Andreas Tolfsen 1b5fe25426 Bug 1284232 - Convert internal error list to a set; r=automatedtester
MozReview-Commit-ID: THj6qxvUus

--HG--
extra : rebase_source : 06c41b5387755edda487c67418c1575c8c639eee
2016-07-08 14:00:56 +01:00
Andreas Tolfsen 7e156be01e Bug 1284232 - Guard against ill-behaved objects on error check; r=automatedtester
It turns out that certain objects such as a DOMRectList have peculiarities
that cause string comparison to throw. This is normally not a problem
as error.isError is usually passed JSON serialisable data. But when it
is not, this try condition helps diagnose problems.

MozReview-Commit-ID: BLNSziwfxXs

--HG--
extra : rebase_source : 8bad973a20d8b69fa27f5de66e4ea287d4bcddcd
2016-07-08 13:58:04 +01:00
Andreas Tolfsen a2d943c381 Bug 1275042 - Turn undefined error message- and stacktrace fields into strings; r=automatedtester
MozReview-Commit-ID: A2DYgTqp2rp

--HG--
extra : rebase_source : c1750ee5e5408f7fcb12895b7cb18b4c56a61b5d
2016-05-23 17:46:04 +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 993e7e8a4e Bug 1245153 - Add error.wrap to wrap Error prototypes; r=automatedtester
Generally, Error prototypes that are not based on WebDriverError must
be wrapped so that they can be serialised across the AsyncMessageChannel.

MozReview-Commit-ID: EtkpEOBhrST

--HG--
extra : histedit_source : c35a686b6b9cea4ae50d0d63223f4cdde6f6e4a2
extra : rebase_source : 4aad87845982cc81fec375ae9f63223a58003aec
extra : commitid : 825ScXhXQSy
extra : source : 1f5e37f8e44641e5434d8393f307f2ea4e80cdc6
extra : intermediate-source : dc6460e0f336c151be27bd124935b52361ea9557
2016-02-03 18:43:37 +00:00
Andreas Tolfsen 4b2e6ac6c6 Bug 1245153 - error.isError must recognise built-in Error prototypes; r=automatedtester
Due to a previous programming error, error.isError only recognised
the base Error prototype.  It must also test for the other built-in
prototypes, such as TypeError et al.

MozReview-Commit-ID: HLkiOAg0Jl1

--HG--
extra : histedit_source : 77fd0e6b6471b18528c27954e6348f93fc520d64
extra : rebase_source : 0e6d2085c37f2a2646c560b10e0c35eead6fcd3a
extra : commitid : F50Xhg2Q86e
extra : source : aec0a01666851a1e03dcb139e1766bae0c1b0fd7
extra : intermediate-source : 36526a2e8b0071b9f51cc30d5b6e0b5c345ec437
2016-02-03 18:41:37 +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 1600a0b310 Bug 1245153 - Add error.wrap to wrap Error prototypes; r=automatedtester
Generally, Error prototypes that are not based on WebDriverError must
be wrapped so that they can be serialised across the AsyncMessageChannel.

MozReview-Commit-ID: EtkpEOBhrST

--HG--
extra : commitid : 825ScXhXQSy
extra : rebase_source : 1d2b7022e311ced9a07830f1017449fbb6220454
extra : source : 1f5e37f8e44641e5434d8393f307f2ea4e80cdc6
extra : histedit_source : c35a686b6b9cea4ae50d0d63223f4cdde6f6e4a2
2016-02-03 18:43:37 +00:00
Andreas Tolfsen 01e43dff80 Bug 1245153 - error.isError must recognise built-in Error prototypes; r=automatedtester
Due to a previous programming error, error.isError only recognised
the base Error prototype.  It must also test for the other built-in
prototypes, such as TypeError et al.

MozReview-Commit-ID: HLkiOAg0Jl1

--HG--
extra : commitid : F50Xhg2Q86e
extra : rebase_source : e7a81b7c07a59209c689b9a53895c17377e39692
extra : source : aec0a01666851a1e03dcb139e1766bae0c1b0fd7
extra : histedit_source : 77fd0e6b6471b18528c27954e6348f93fc520d64
2016-02-03 18:41:37 +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 d2259a00f8 Bug 1245153 - Add error.wrap to wrap Error prototypes; r=automatedtester
Generally, Error prototypes that are not based on WebDriverError must
be wrapped so that they can be serialised across the AsyncMessageChannel.

--HG--
extra : commitid : 825ScXhXQSy
extra : rebase_source : c525b539b5139d479ea562614c26e46d3fb01bb8
extra : histedit_source : c35a686b6b9cea4ae50d0d63223f4cdde6f6e4a2
2016-02-03 18:43:37 +00:00
Andreas Tolfsen 1a77effa7d Bug 1245153 - error.isError must recognise built-in Error prototypes; r=automatedtester
Due to a previous programming error, error.isError only recognised
the base Error prototype.  It must also test for the other built-in
prototypes, such as TypeError et al.

--HG--
extra : commitid : F50Xhg2Q86e
extra : rebase_source : 3f757bf9667763718d54fcb6912156bcdcd9e787
extra : histedit_source : 77fd0e6b6471b18528c27954e6348f93fc520d64
2016-02-03 18:41:37 +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 7b82c6d1d3 Bug 1240550 - Make fnName, file, and line optional arguments; r=automatedtester
Previously fnName and line was tested as the entry requirement for
printing the filename to the trace information.  Testing line here was
premature since it is meant to be an optional argument.

This patch rectifies this behaviour by testing for each of the optional
arguments sequentially.  This means the file argument is required to print
the line, and the fnName argument is required to print any of those two.

--HG--
extra : rebase_source : 484be6c8e09c8d4c5e6ce25e12ffc522d8111963
2016-01-18 18:55:52 +00:00
Phil Ringnalda fd6a59b7d0 Back out changeset 084c55b0bd3d (bug 1240550) for test_error.js failures 2016-01-18 17:33:30 -08:00
Andreas Tolfsen ef1b184fb1 Bug 1240550 - Make fnName, file, and line optional arguments; r=automatedtester
Previously fnName and line was tested as the entry requirement for
printing the filename to the trace information.  Testing line here was
premature since it is meant to be an optional argument.

This patch rectifies this behaviour by testing for each of the optional
arguments sequentially.  This means the file argument is required to print
the line, and the fnName argument is required to print any of those two.

--HG--
extra : rebase_source : d6490c7a8c393fdad2a4d008db82bdf0f1010175
2016-01-18 18:55:52 +00:00
Andreas Tolfsen 14fd48b7c1 Bug 1215502: Perform nsIException instance test for XPCOM exceptions r=automatedtester
The current test of the `result' property does not always pass for all
types of XPCOM exceptions.  A safer test is to do an instance check
against Components.interfaces.nsIException.

This fixes hangs such as the one described in bug 1202576.

r=dburns

--HG--
extra : rebase_source : 040d84c83ea8462c852d1bede96375d7133bf319
2016-01-07 14:37:06 +00:00
Andreas Tolfsen 3421774080 Bug 1211489: Provide message sequencing in Marionette
Message sequencing allows Marionette to provide an asynchronous,
parallel pipelining user-facing interface, limit chances of payload
race conditions, and remove stylistic inconsistencies in how commands
and responses are dispatched internally.

Clients that deliver a blocking WebDriver interface are still be expected
to not send further command requests before the response from the last
command has come back, but if they still happen to do so because of
programming error or otherwise, no harm will be done.  This will guard
against bugs such as bug 1207125.

This patch formalises the command and response concepts, and applies
these concepts to emulator callbacks. Through the new message format,
Marionette is able to provide two-way parallel communication.  In other
words, the server will be able to instruct the client to perform a
command in a non ad-hoc way.

runEmulatorCmd and runEmulatorShell are both turned into command
instructions originating from the server.  This resolves a lot of
technical debt in the server code because they are no longer special-cased
to circumvent the dispatching technique used for all other commands;
commands may originate from either the client or the server providing
parallel pipelining enforced through message sequencing:

             client      server
               |            |
    msgid=1    |----------->|
               |  command   |
               |            |
    msgid=2    |<-----------|
               |  command   |
               |            |
    msgid=2    |----------->|
               |  response  |
               |            |
    msgid=1    |<-----------|
               |  response  |
               |            |

The protocol now consists of a "Command" message and the corresponding
"Response" message.  A "Response" message must always be sent in reply
to a "Command" message.

This bumps the Marionette protocol level to 3.

r=dburns
r=jgriffin

--HG--
extra : commitid : 1kz4Oa2q3Un
2015-09-26 17:12:01 +01:00
Sebastian Hengst 2bc8fc4402 Backed out changeset c2aa06a2ab49 (bug 1211489) for Gij(39) failures. r=backout 2015-11-26 23:47:34 +01:00
Andreas Tolfsen 86bd46756a Bug 1211489: Provide message sequencing in Marionette
Message sequencing allows Marionette to provide an asynchronous,
parallel pipelining user-facing interface, limit chances of payload
race conditions, and remove stylistic inconsistencies in how commands
and responses are dispatched internally.

Clients that deliver a blocking WebDriver interface are still be expected
to not send further command requests before the response from the last
command has come back, but if they still happen to do so because of
programming error or otherwise, no harm will be done.  This will guard
against bugs such as bug 1207125.

This patch formalises the command and response concepts, and applies
these concepts to emulator callbacks. Through the new message format,
Marionette is able to provide two-way parallel communication.  In other
words, the server will be able to instruct the client to perform a
command in a non ad-hoc way.

runEmulatorCmd and runEmulatorShell are both turned into command
instructions originating from the server.  This resolves a lot of
technical debt in the server code because they are no longer special-cased
to circumvent the dispatching technique used for all other commands;
commands may originate from either the client or the server providing
parallel pipelining enforced through message sequencing:

             client      server
               |            |
    msgid=1    |----------->|
               |  command   |
               |            |
    msgid=2    |<-----------|
               |  command   |
               |            |
    msgid=2    |----------->|
               |  response  |
               |            |
    msgid=1    |<-----------|
               |  response  |
               |            |

The protocol now consists of a "Command" message and the corresponding
"Response" message.  A "Response" message must always be sent in reply
to a "Command" message.

This bumps the Marionette protocol level to 3.

r=dburns
r=jgriffin

--HG--
extra : commitid : 2upWRuXyqPF
extra : rebase_source : f384801e209e4b49ef57055fd550c3c435ece4ef
2015-09-26 17:12:01 +01: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
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
Alexandre Poirot 0896aa8eee Bug 1208018 - Improve marionette stack info and dump it when executeJSScript throws. r=jgriffin 2015-09-29 03:02:48 -07:00