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
This renames the ElementNotVisibleError to ElementNotInteractableError,
and adds a new ElementClickInterceptedError.
MozReview-Commit-ID: 6cjVghUCvyv
--HG--
extra : rebase_source : 3f2105c1f631ac4776e231bb6c88a00e26f1ae6c
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
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
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
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
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
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
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
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
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
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