commit 75ec7127ed0f304be561c41793c9ef2c8280b7bb
parent 0b4170f632f39cb75c59a3726516f862cf0b0545
Author: Jack Brown <jbrown@mozilla.com>
Date: Wed, 31 Dec 2025 21:19:14 +0200
Bug 2003587 - Fix for pref security.certerrors.felt-privacy-v1 enabled by default. r=test-fix
Differential Revision: https://phabricator.services.mozilla.com/D277712
Diffstat:
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/dom/security/test/general/test_xfo_error_page.html b/dom/security/test/general/test_xfo_error_page.html
@@ -12,12 +12,19 @@
SimpleTest.waitForExplicitFinish();
+let { ContentTaskUtils } = SpecialPowers.ChromeUtils.importESModule(
+ "resource://testing-common/ContentTaskUtils.sys.mjs"
+);
+
const XFO_ERROR_PAGE_MSG = "This page has an X-Frame-Options policy that prevents it from being loaded in this context";
let xfo_testframe = document.getElementById("xfo_testframe");
-xfo_testframe.onload = function() {
+xfo_testframe.onload = async function() {
let wrappedXFOFrame = SpecialPowers.wrap(xfo_testframe.contentWindow);
+ await ContentTaskUtils.waitForCondition(
+ () => wrappedXFOFrame.document.body.innerHTML.includes(XFO_ERROR_PAGE_MSG)
+ );
let frameContentXFO = wrappedXFOFrame.document.body.innerHTML;
ok(frameContentXFO.includes(XFO_ERROR_PAGE_MSG), "xfo error page correct");
SimpleTest.finish();