commit ced72179decc0fcffcbf4f4540ff4bcafbfb182e
parent ef5f480b4cf4b2944ee05de4e9ba6fc92d4a2ae0
Author: Timothy Nikkel <tnikkel@gmail.com>
Date: Sun, 9 Nov 2025 07:48:58 +0000
Bug 1999007. In browser_test_popup_menu_in_parent_process_content.js load test page in a more standard way. r=layout-reviewers,emilio
Turns out we don't need this special way of loading the page (it causes issues on asan/tsan), we can use a more standard way and it still retains the properties we need (that it is a root content doc loaded in the parent process, we have asserts guaranteeing that in this test).
Differential Revision: https://phabricator.services.mozilla.com/D271895
Diffstat:
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/gfx/layers/apz/test/mochitest/browser_test_popup_menu_in_parent_process_content.js b/gfx/layers/apz/test/mochitest/browser_test_popup_menu_in_parent_process_content.js
@@ -75,16 +75,11 @@ async function runTest(aTestFile) {
await promiseApzFlushedRepaints();
await waitUntilApzStable();
+ let loaded = BrowserTestUtils.browserLoaded(browser);
const url_of_test_file = getRootDirectory(gTestPath) + aTestFile;
- await SpecialPowers.spawn(
- browser,
- [url_of_test_file],
- async function (_url_of_test_file) {
- content.location = _url_of_test_file;
- }
- );
+ BrowserTestUtils.startLoadingURIString(browser, url_of_test_file);
- await BrowserTestUtils.browserLoaded(browser);
+ await loaded;
// Make sure the document gets loaded in the parent process and is a top
// level content document.