mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-08 12:19:05 +02:00
This is generally pretty straightforward, and rewrites nearly all calls. It skips the ones that it can detect using frame script globals like `sendAsyncMessage`, though. Differential Revision: https://phabricator.services.mozilla.com/D53740 --HG-- extra : moz-landing-system : lando
31 lines
1.2 KiB
JavaScript
31 lines
1.2 KiB
JavaScript
/* 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,<iframe width='700' height='700'></iframe>";
|
|
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"
|
|
);
|
|
});
|
|
});
|
|
});
|