summaryrefslogtreecommitdiffstats
path: root/devtools/shared/commands/target/tests/browser_target_command_detach.js
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/shared/commands/target/tests/browser_target_command_detach.js')
-rw-r--r--devtools/shared/commands/target/tests/browser_target_command_detach.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/devtools/shared/commands/target/tests/browser_target_command_detach.js b/devtools/shared/commands/target/tests/browser_target_command_detach.js
index a0056cd7a5..800832a111 100644
--- a/devtools/shared/commands/target/tests/browser_target_command_detach.js
+++ b/devtools/shared/commands/target/tests/browser_target_command_detach.js
@@ -30,9 +30,9 @@ add_task(async function () {
info("Call any target front method, to ensure it works fine");
await targetCommand.targetFront.focus();
- // Destroying the target front should end up calling "WindowGlobalTargetActor.detach"
- // which should destroy the target on the server side
- await targetCommand.targetFront.destroy();
+ // Simulate a toolbox closing by the cleanup of TargetCommand.
+ // This will stop watching for all target types and destroy all target actors/fronts.
+ await targetCommand.stopListening();
info(
"Now create a second commands after destroy, to see if we can spawn a new, functional target"