diff options
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.js | 19 |
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; |