summaryrefslogtreecommitdiffstats
path: root/devtools/server/tests/xpcshell/test_xpcshell_debugging.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
commitd8bbc7858622b6d9c278469aab701ca0b609cddf (patch)
treeeff41dc61d9f714852212739e6b3738b82a2af87 /devtools/server/tests/xpcshell/test_xpcshell_debugging.js
parentReleasing progress-linux version 125.0.3-1~progress7.99u1. (diff)
downloadfirefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz
firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'devtools/server/tests/xpcshell/test_xpcshell_debugging.js')
-rw-r--r--devtools/server/tests/xpcshell/test_xpcshell_debugging.js16
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 },
{}