tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit f6304a9ea472f60b38ba67f971d2a095d568f915
parent 351966e29dc903d4f529fa78c0885ef9582f4acb
Author: Gabriele Svelto <gsvelto@mozilla.com>
Date:   Thu, 27 Nov 2025 15:29:52 +0000

Bug 1989686 - Don't look for minidumps in tests that don't care about them r=afranchuk,extension-reviewers,robwu,mconley

This is a workaround for the intermittent failures when generating
minidumps on macOS 10.15 in two browser mochitests. The tests crash
several frames but don't care about the crash reports, however they
currently fail because sometimes a minidump is not generated. This patch
instructs the harness to not try and clean up the minidumps, this
prevents the spurious failures and can be removed once we make macOS
minidump generation more robust (bug 1614931).

Differential Revision: https://phabricator.services.mozilla.com/D274061

Diffstat:
Mbrowser/components/extensions/test/browser/browser_ext_port_disconnect_on_crash.js | 12++++++++++--
Mbrowser/components/tabbrowser/test/browser/tabs/browser_restore_isAppTab.js | 6+++++-
2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/browser/components/extensions/test/browser/browser_ext_port_disconnect_on_crash.js b/browser/components/extensions/test/browser/browser_ext_port_disconnect_on_crash.js @@ -49,7 +49,11 @@ add_task(async function connect_from_tab_to_bg_and_crash_tab() { await extension.awaitMessage("bg_runtime_onConnect"); // Force the message manager to disconnect without giving the content a // chance to send an "Extension:Port:Disconnect" message. - await BrowserTestUtils.crashFrame(tab.linkedBrowser); + await BrowserTestUtils.crashFrame( + tab.linkedBrowser, + /* shouldShowTabCrashPage */ true, + /* shouldClearMinidumps */ false + ); await extension.awaitMessage("port_disconnected"); BrowserTestUtils.removeTab(tab); await extension.unload(); @@ -106,7 +110,11 @@ add_task(async function connect_from_bg_to_tab_and_crash_tab() { await extension.awaitMessage("tab_runtime_onConnect"); // Force the message manager to disconnect without giving the content a // chance to send an "Extension:Port:Disconnect" message. - await BrowserTestUtils.crashFrame(tab.linkedBrowser); + await BrowserTestUtils.crashFrame( + tab.linkedBrowser, + /* shouldShowTabCrashPage */ true, + /* shouldClearMinidumps */ false + ); await extension.awaitMessage("port_disconnected"); BrowserTestUtils.removeTab(tab); await extension.unload(); diff --git a/browser/components/tabbrowser/test/browser/tabs/browser_restore_isAppTab.js b/browser/components/tabbrowser/test/browser/tabs/browser_restore_isAppTab.js @@ -22,7 +22,11 @@ var restart = async function (browser) { // Make sure the main process has all of the current tab state before crashing await TabStateFlusher.flush(browser); - await BrowserTestUtils.crashFrame(browser); + await BrowserTestUtils.crashFrame( + browser, + /* shouldShowTabCrashPage */ true, + /* shouldClearMinidumps */ false + ); let tab = gBrowser.getTabForBrowser(browser); SessionStore.reviveCrashedTab(tab);