mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 00:35:44 +00:00
Bug 1640904 - Do not assert specific error message in browser_actor_error.js r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D77136
This commit is contained in:
parent
85070a1062
commit
d08d42cd18
@ -41,9 +41,6 @@ add_task(async function test_old_actor() {
|
|||||||
const TEST_ERRORS_ACTOR_URL =
|
const TEST_ERRORS_ACTOR_URL =
|
||||||
"chrome://mochitests/content/browser/devtools/server/tests/browser/test-errors-actor.js";
|
"chrome://mochitests/content/browser/devtools/server/tests/browser/test-errors-actor.js";
|
||||||
add_task(async function test_protocoljs_actor() {
|
add_task(async function test_protocoljs_actor() {
|
||||||
// Flip this pref to ensure consistent error reporting for `throwsException`.
|
|
||||||
await pushPref("javascript.options.property_error_message_fix", true);
|
|
||||||
|
|
||||||
DevToolsServer.init();
|
DevToolsServer.init();
|
||||||
DevToolsServer.registerAllActors();
|
DevToolsServer.registerAllActors();
|
||||||
|
|
||||||
@ -71,9 +68,10 @@ add_task(async function test_protocoljs_actor() {
|
|||||||
).test(e.message);
|
).test(e.message);
|
||||||
});
|
});
|
||||||
await Assert.rejects(testErrorsFront.throwsException(), e => {
|
await Assert.rejects(testErrorsFront.throwsException(), e => {
|
||||||
|
// Not asserting the specific error message here, as it changes depending
|
||||||
|
// on the channel.
|
||||||
return new RegExp(
|
return new RegExp(
|
||||||
'Protocol error \\(TypeError\\): can\'t access property "b",' +
|
`Protocol error \\(TypeError\\):.* from: ${testErrorsFront.actorID} ` +
|
||||||
` this.a is undefined from: ${testErrorsFront.actorID} ` +
|
|
||||||
`\\(${TEST_ERRORS_ACTOR_URL}:\\d+:\\d+\\)`
|
`\\(${TEST_ERRORS_ACTOR_URL}:\\d+:\\d+\\)`
|
||||||
).test(e.message);
|
).test(e.message);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user