Commit Graph

20 Commits

Author SHA1 Message Date
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
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
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
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
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
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
c2c7e6b203 Bug 1239373 - Tests for testing/marionette/error.js; r=automatedtester
--HG--
extra : rebase_source : d401edd95af2ef9225c441ae2e2c2dc117b04c98
extra : source : bc5d1c47c913ae40af10e623f364ee4fa91efbac
2016-01-18 18:38:47 +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
3e6f2492e0 Bug 1239373 - Tests for testing/marionette/error.js; r=automatedtester
--HG--
extra : rebase_source : 123663c1e833a945b677b248dce08118445b6b2d
2016-01-18 18:38:47 +00:00