diff options
Diffstat (limited to 'devtools/server/tests/xpcshell/test_xpcshell_debugging.js')
-rw-r--r-- | devtools/server/tests/xpcshell/test_xpcshell_debugging.js | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/devtools/server/tests/xpcshell/test_xpcshell_debugging.js b/devtools/server/tests/xpcshell/test_xpcshell_debugging.js index ff54d7390d..12d38b923d 100644 --- a/devtools/server/tests/xpcshell/test_xpcshell_debugging.js +++ b/devtools/server/tests/xpcshell/test_xpcshell_debugging.js @@ -35,11 +35,17 @@ add_task(async function () { ); // Even though we have no tabs, getMainProcess gives us the chrome debugger. - const targetDescriptor = await client.mainRoot.getMainProcess(); - const front = await targetDescriptor.getTarget(); - const watcher = await targetDescriptor.getWatcher(); + const commands = await CommandsFactory.forMainProcess({ client }); + await commands.targetCommand.startListening(); - const threadFront = await front.attachThread(); + // We have to pass at least one valid thread configuration in order to initialize + // the thread actor and make it pause on breakpoint/debugger statements. + await commands.threadConfigurationCommand.updateConfiguration({ + skipBreakpoints: false, + }); + const threadFront = await commands.targetCommand.targetFront.getFront( + "thread" + ); // Checks that the thread actor initializes immediately and that _setupDevToolsServer // callback gets called. @@ -72,7 +78,7 @@ add_task(async function () { ); info("Dynamically add a breakpoint after the debugger statement"); - const breakpointsFront = await watcher.getBreakpointListActor(); + const breakpointsFront = await commands.watcherFront.getBreakpointListActor(); await breakpointsFront.setBreakpoint( { sourceUrl: testFile.path, line: 11, column: 0 }, {} |