From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- .../base/content/test/about/browser_bug633691.js | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 browser/base/content/test/about/browser_bug633691.js (limited to 'browser/base/content/test/about/browser_bug633691.js') diff --git a/browser/base/content/test/about/browser_bug633691.js b/browser/base/content/test/about/browser_bug633691.js new file mode 100644 index 0000000000..33d58475f6 --- /dev/null +++ b/browser/base/content/test/about/browser_bug633691.js @@ -0,0 +1,32 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ + */ + +add_task(async function test() { + const URL = "data:text/html,"; + await BrowserTestUtils.withNewTab( + { gBrowser, url: URL }, + async function (browser) { + let context = await SpecialPowers.spawn(browser, [], function () { + let iframe = content.document.querySelector("iframe"); + iframe.src = "https://expired.example.com/"; + return BrowsingContext.getFromWindow(iframe.contentWindow); + }); + await TestUtils.waitForCondition(() => { + let frame = context.currentWindowGlobal; + return frame && frame.documentURI.spec.startsWith("about:certerror"); + }); + await SpecialPowers.spawn(context, [], async function () { + await ContentTaskUtils.waitForCondition( + () => content.document.readyState == "interactive" + ); + let aP = content.document.getElementById("badCertAdvancedPanel"); + Assert.ok(aP, "Advanced content should exist"); + Assert.ok( + ContentTaskUtils.is_hidden(aP), + "Advanced content should not be visible by default" + ); + }); + } + ); +}); -- cgit v1.2.3