tor-browser

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

commit e1d9134b880da39b739222ede16e41894b609b62
parent 75ec7127ed0f304be561c41793c9ef2c8280b7bb
Author: Jack Brown <jbrown@mozilla.com>
Date:   Wed, 31 Dec 2025 21:36:35 +0200

Bug 2003587 - Pref security.certerrors.felt-privacy-v1 browser_inspector_navigate_to_errors. a=test-only

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

Diffstat:
Mdevtools/client/inspector/test/browser_inspector_navigate_to_errors.js | 10++++++++++
Mdevtools/client/inspector/test/head.js | 2+-
2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/devtools/client/inspector/test/browser_inspector_navigate_to_errors.js b/devtools/client/inspector/test/browser_inspector_navigate_to_errors.js @@ -11,6 +11,10 @@ const TEST_URL_2 = "http://127.0.0.1:36325/"; const TEST_URL_3 = "https://www.wronguri.wronguri/"; const TEST_URL_4 = "data:text/html,<html><body>test-doc-4</body></html>"; +let { ContentTaskUtils } = SpecialPowers.ChromeUtils.importESModule( + "resource://testing-common/ContentTaskUtils.sys.mjs" +); + add_task(async function () { // Open the inspector on a valid URL const { inspector } = await openInspectorForURL(TEST_URL_1); @@ -41,6 +45,9 @@ add_task(async function () { ); let domain = TEST_URL_2.match(/^http:\/\/(.*)\/$/)[1]; let errorMsg = bundle.formatStringFromName("connectionFailure", [domain]); + await ContentTaskUtils.waitForCondition( + () => getDisplayedNodeTextContent("#errorShortDesc", inspector) + ); is( await getDisplayedNodeTextContent("#errorShortDesc", inspector), errorMsg, @@ -52,6 +59,9 @@ add_task(async function () { domain = TEST_URL_3.match(/^https:\/\/(.*)\/$/)[1]; errorMsg = bundle.formatStringFromName("dnsNotFound2", [domain]); + await ContentTaskUtils.waitForCondition( + () => getDisplayedNodeTextContent("#errorShortDesc", inspector) + ); is( await getDisplayedNodeTextContent("#errorShortDesc", inspector), errorMsg, diff --git a/devtools/client/inspector/test/head.js b/devtools/client/inspector/test/head.js @@ -1184,7 +1184,7 @@ async function getDisplayedNodeTextContent(selector, inspector) { await waitForMultipleChildrenUpdates(inspector); if (container) { const textContainer = container.elt.querySelector("pre"); - return textContainer.textContent; + return textContainer?.textContent; } return null; }