From e25cf1ba6f92d1d650705742d0fe6b39f49d77f7 Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Sat, 9 Dec 2023 14:12:40 +0100 Subject: [PATCH] Don't run beforeunload callback when closing page in integration tests For now, running such callbacks is disabled in Firefox but there are some plan to reenable them: https://bugzilla.mozilla.org/show_bug.cgi?id=1824220 Having them blocks us to switch to bidi with Chrome. --- test/integration/test_utils.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/test_utils.mjs b/test/integration/test_utils.mjs index db080b6d9..40f6db6b1 100644 --- a/test/integration/test_utils.mjs +++ b/test/integration/test_utils.mjs @@ -71,7 +71,7 @@ function closePages(pages) { pages.map(async ([_, page]) => { // Avoid to keep something from a previous test. await page.evaluate(() => window.localStorage.clear()); - await page.close(); + await page.close({ runBeforeUnload: false }); }) ); }