From 3b345a9b6dffe7d8994bce50227df5b8ef2f7e47 Mon Sep 17 00:00:00 2001 From: Benjamin VanderSloot Date: Tue, 29 Oct 2024 11:47:33 +0000 Subject: [PATCH] Bug 1922020, part 2 - Remove reliance on window.opener storage access heuristic in user.js from docshell/test/mochitest - r=smaug The helper function here is derived from code you helped design when we were first enabling TCP in xorigin mochitests Differential Revision: https://phabricator.services.mozilla.com/D224807 --- docshell/test/mochitest/test_bug1740516.html | 2 + docshell/test/mochitest/test_bug1741132.html | 4 +- docshell/test/mochitest/test_bug1743353.html | 4 +- docshell/test/mochitest/test_bug1747033.html | 4 +- docshell/test/mochitest/test_bug1773192.html | 2 + docshell/test/mochitest/test_bug1850335.html | 2 + docshell/test/mochitest/test_bug660404.html | 50 ++++++++++---------- 7 files changed, 41 insertions(+), 27 deletions(-) diff --git a/docshell/test/mochitest/test_bug1740516.html b/docshell/test/mochitest/test_bug1740516.html index b54932c736ba..9f7b69abad6e 100644 --- a/docshell/test/mochitest/test_bug1740516.html +++ b/docshell/test/mochitest/test_bug1740516.html @@ -26,6 +26,8 @@ }); } async function runTest() { + await SimpleTest.enableLegacyUnpartitionedStorage(); + let outerBC = new BroadcastChannel("bug1740516_1"); let innerBC = new BroadcastChannel("bug1740516_1_inner"); diff --git a/docshell/test/mochitest/test_bug1741132.html b/docshell/test/mochitest/test_bug1741132.html index 1ae9727d9c34..7d147ae597e3 100644 --- a/docshell/test/mochitest/test_bug1741132.html +++ b/docshell/test/mochitest/test_bug1741132.html @@ -11,7 +11,9 @@ SimpleTest.waitForExplicitFinish(); - function runTest() { + async function runTest() { + await SimpleTest.enableLegacyUnpartitionedStorage(); + let bc = new BroadcastChannel("bug1741132"); // Setting the pref to 0 should evict all content viewers. diff --git a/docshell/test/mochitest/test_bug1743353.html b/docshell/test/mochitest/test_bug1743353.html index a5d88df3f62d..3480f2c243ac 100644 --- a/docshell/test/mochitest/test_bug1743353.html +++ b/docshell/test/mochitest/test_bug1743353.html @@ -8,7 +8,9 @@