summaryrefslogtreecommitdiffstats
path: root/devtools/shared/commands/target/tests/browser_target_command_scope_flag.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /devtools/shared/commands/target/tests/browser_target_command_scope_flag.js
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'devtools/shared/commands/target/tests/browser_target_command_scope_flag.js')
-rw-r--r--devtools/shared/commands/target/tests/browser_target_command_scope_flag.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/devtools/shared/commands/target/tests/browser_target_command_scope_flag.js b/devtools/shared/commands/target/tests/browser_target_command_scope_flag.js
index 65d9e9a622..0ceaaf39ee 100644
--- a/devtools/shared/commands/target/tests/browser_target_command_scope_flag.js
+++ b/devtools/shared/commands/target/tests/browser_target_command_scope_flag.js
@@ -52,6 +52,25 @@ add_task(async function () {
forceNewProcess: true,
});
+ // Verify that only PROCESS and top target have their thread actor attached.
+ // We especially care about having the FRAME targets to not be attached,
+ // otherwise we would have two thread actor debugging the same thread
+ // with the PROCESS target already debugging all FRAME documents.
+ for (const target of targets) {
+ const threadFront = await target.getFront("thread");
+ const isAttached = await threadFront.isAttached();
+ if (target.targetType == TYPES.PROCESS) {
+ ok(isAttached, "All process targets are attached");
+ } else if (target.isTopLevel) {
+ ok(isAttached, "The top level target is attached");
+ } else {
+ ok(
+ !isAttached,
+ "The frame targets should not be attached in multiprocess mode"
+ );
+ }
+ }
+
const newTabProcessID =
gBrowser.selectedTab.linkedBrowser.browsingContext.currentWindowGlobal
.osPid;