diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
commit | da4c7e7ed675c3bf405668739c3012d140856109 (patch) | |
tree | cdd868dba063fecba609a1d819de271f0d51b23e /devtools/shared/commands/target | |
parent | Adding upstream version 125.0.3. (diff) | |
download | firefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip |
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'devtools/shared/commands/target')
3 files changed, 14 insertions, 3 deletions
diff --git a/devtools/shared/commands/target/tests/browser_target_command_bfcache.js b/devtools/shared/commands/target/tests/browser_target_command_bfcache.js index c5ce76848e..03de5e3b5d 100644 --- a/devtools/shared/commands/target/tests/browser_target_command_bfcache.js +++ b/devtools/shared/commands/target/tests/browser_target_command_bfcache.js @@ -145,7 +145,12 @@ async function testTopLevelNavigations(bfcacheInParent) { // Go back to the first page, this should be a bfcache navigation, and, // we should get a new target info("Go back to the first page"); + const onPageShow = BrowserTestUtils.waitForContentEvent( + gBrowser.selectedBrowser, + "pageshow" + ); gBrowser.selectedBrowser.goBack(); + await onPageShow; await waitFor( () => targets.length == 3, 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" 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 0ceaaf39ee..883cf9356b 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 @@ -27,6 +27,12 @@ add_task(async function () { const commands = await CommandsFactory.forMainProcess(); const targetCommand = commands.targetCommand; await targetCommand.startListening(); + + // Pass any configuration, in order to ensure attaching all the thread actors + await commands.threadConfigurationCommand.updateConfiguration({ + skipBreakpoints: false, + }); + const { TYPES } = targetCommand; const targets = new Set(); |