зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1723452: Update tests within dom/ipc to work with https-first enabled r=baku
Differential Revision: https://phabricator.services.mozilla.com/D122350
This commit is contained in:
Родитель
7380b2ed60
Коммит
838a7bfdfc
|
@ -2,9 +2,11 @@
|
|||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
"use strict";
|
||||
|
||||
const CONTENT_WINDOW_URL = "https://example.com/";
|
||||
|
||||
declTest("contentWindow null when inner window inactive", {
|
||||
matches: [TEST_URL + "*"],
|
||||
url: TEST_URL + "?1",
|
||||
matches: [CONTENT_WINDOW_URL + "*"],
|
||||
url: CONTENT_WINDOW_URL + "?1",
|
||||
|
||||
async test(browser) {
|
||||
// If Fission is disabled, the pref is no-op.
|
||||
|
@ -17,7 +19,7 @@ declTest("contentWindow null when inner window inactive", {
|
|||
|
||||
await actorParent.sendQuery("storeActor");
|
||||
|
||||
let url = TEST_URL + "?2";
|
||||
let url = CONTENT_WINDOW_URL + "?2";
|
||||
let loaded = BrowserTestUtils.browserLoaded(browser, false, url);
|
||||
await BrowserTestUtils.loadURI(browser, url);
|
||||
await loaded;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
"use strict";
|
||||
/* eslint-env mozilla/frame-script */
|
||||
|
||||
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
const { XPCShellContentUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/XPCShellContentUtils.jsm"
|
||||
);
|
||||
|
@ -58,6 +59,7 @@ function childFrameScript() {
|
|||
}
|
||||
|
||||
add_task(async function() {
|
||||
Services.prefs.setBoolPref("dom.security.https_first", false);
|
||||
let page = await XPCShellContentUtils.loadContentPage(childFrameURL, {
|
||||
remote: true,
|
||||
});
|
||||
|
@ -94,4 +96,5 @@ add_task(async function() {
|
|||
});
|
||||
|
||||
await page.close();
|
||||
Services.prefs.clearUserPref("dom.security.https_first");
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче