Bug 1465527 - Return structured stacktrace from Marionette reftest harness. r?jgraham
The reftest harness embedded in Marionette previously only included
the stacktrace of the error in the "message" field to wptrunner.
Now that wptrunner supports logging parent test stacktraces,
this patch changes the "message" field to include the stringified
error message (including the error type information) and adds a new
"stack" field with the stacktrace previously logged as the error message.
MozReview-Commit-ID: KlrCZi01XWC
--- a/testing/marionette/reftest.js
+++ b/testing/marionette/reftest.js
@@ -190,17 +190,22 @@ min-width: 600px; min-height: 600px; max
}, timeout);
});
let testRunner = (async () => {
let result;
try {
result = await this.runTest(testUrl, references, expected, timeout);
} catch (e) {
- result = {status: STATUS.ERROR, message: e.stack, extra: {}};
+ result = {
+ status: STATUS.ERROR,
+ message: String(e),
+ stack: e.stack,
+ extra: {},
+ };
}
return result;
})();
let result = await Promise.race([testRunner, timeoutPromise]);
this.parentWindow.clearTimeout(timeoutHandle);
if (result.status === STATUS.TIMEOUT) {
this.abort();