Open Bug 1508289 Opened 6 years ago Updated 2 years ago

xpcshell tests asserting "uncaught exceptions" fail when running in Worker DebuggerServer

Categories

(DevTools :: Debugger, task, P3)

task

Tracking

(Not tracked)

People

(Reporter: ochameau, Unassigned)

References

(Blocks 2 open bugs)

Details

While working on using more shared initialization code in xpcshell tests for the debugger server, I realized that various tests related to uncaught exceptions were not running against the WorkerDebuggerServer. That's the DebuggerServer spawn in workers, which is special as it runs without any chrome privileges and do not have access to ChromeUtils/Components.*.
If we fix the tests to run against it, there tests fail.

The issue is that this test_pause_frame method is expected to run twice, once for each DebuggerServer (the regular and the worker one). But we stop at the first run here:
https://searchfox.org/mozilla-central/source/devtools/server/tests/unit/test_ignore_caught_exceptions.js#42
  finishClient(gClient);
As finishClient calls do_test_finished, which tells xpcshell test harness to proceed to the next test!

It impacts three tests (all the one using finishClient *and* trying to run against two kind of server:
https://searchfox.org/mozilla-central/source/devtools/server/tests/unit/test_ignore_caught_exceptions.js
https://searchfox.org/mozilla-central/source/devtools/server/tests/unit/test_ignore_no_interface_exceptions.js
https://searchfox.org/mozilla-central/source/devtools/server/tests/unit/test_pause_exceptions-03.js
Summary: xpcshell tests against uncaught exception do not run in Worker DebuggerServer and fail → xpcshell tests asserting "uncaught exceptions" fail when running in Worker DebuggerServer
Priority: -- → P4
Blocks: dbg-server
Type: defect → task
Priority: P4 → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.