1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 09:38:06 +02:00

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.
This commit is contained in:
Calixte Denizet 2023-12-09 14:12:40 +01:00
parent d6b9e62463
commit e25cf1ba6f

View file

@ -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 });
})
);
}