Bug 1735543: Update tests within remote/shared/messagehandler to work with https-first enabled r=webdriver-reviewers,jdescottes

Differential Revision: https://phabricator.services.mozilla.com/D128470
This commit is contained in:
Christoph Kerschbaumer 2021-10-14 12:31:45 +00:00
Родитель 201a234f00
Коммит 1b3f14f95f
6 изменённых файлов: 12 добавлений и 10 удалений

Просмотреть файл

@ -8,7 +8,7 @@ add_task(async function test_broadcasting_only_content_process() {
const tab1 = gBrowser.selectedTab;
await loadURL(
tab1.linkedBrowser,
"http://example.com/document-builder.sjs?html=tab"
"https://example.com/document-builder.sjs?html=tab"
);
const browsingContext1 = tab1.linkedBrowser.browsingContext;

Просмотреть файл

@ -3,7 +3,7 @@
"use strict";
const TEST_PAGE = "http://example.com/document-builder.sjs?html=tab";
const TEST_PAGE = "https://example.com/document-builder.sjs?html=tab";
add_task(async function test_broadcasting_two_tabs_command() {
info("Navigate the initial tab to the test URL");

Просмотреть файл

@ -3,7 +3,7 @@
"use strict";
const TEST_PAGE = "http://example.com/document-builder.sjs?html=tab";
const TEST_PAGE = "https://example.com/document-builder.sjs?html=tab";
add_task(async function test_broadcasting_two_tabs_with_params_command() {
info("Navigate the initial tab to the test URL");

Просмотреть файл

@ -3,7 +3,7 @@
"use strict";
const TEST_PAGE = "http://example.com/document-builder.sjs?html=tab";
const TEST_PAGE = "https://example.com/document-builder.sjs?html=tab";
add_task(async function test_broadcasting_two_windows_command() {
const window1Browser = gBrowser.selectedTab.linkedBrowser;

Просмотреть файл

@ -21,7 +21,7 @@ const { WindowGlobalMessageHandler } = ChromeUtils.import(
add_task(async function test_event() {
const tab = BrowserTestUtils.addTab(
gBrowser,
"http://example.com/document-builder.sjs?html=tab"
"https://example.com/document-builder.sjs?html=tab"
);
await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
const browsingContext = tab.linkedBrowser.browsingContext;
@ -96,7 +96,7 @@ add_task(async function test_root_event() {
add_task(async function test_windowglobal_in_root_event() {
const tab = BrowserTestUtils.addTab(
gBrowser,
"http://example.com/document-builder.sjs?html=tab"
"https://example.com/document-builder.sjs?html=tab"
);
await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
const browsingContext = tab.linkedBrowser.browsingContext;
@ -139,7 +139,7 @@ add_task(async function test_windowglobal_in_root_event() {
add_task(async function test_event_multisession() {
const tab = BrowserTestUtils.addTab(
gBrowser,
"http://example.com/document-builder.sjs?html=tab"
"https://example.com/document-builder.sjs?html=tab"
);
await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
const browsingContextId = tab.linkedBrowser.browsingContext.id;

Просмотреть файл

@ -50,7 +50,7 @@ async function addTab(url) {
*/
function createFrame(domain) {
return createFrameForUri(
`http://${domain}/document-builder.sjs?html=frame-${domain}`
`https://${domain}/document-builder.sjs?html=frame-${domain}`
);
}
@ -73,14 +73,16 @@ function createFrameForUri(uri) {
function createTestMarkupWithFrames() {
// Create the markup for an example.net frame nested in an example.com frame.
const NESTED_FRAME_MARKUP = createFrameForUri(
`http://example.org/document-builder.sjs?html=${createFrame("example.net")}`
`https://example.org/document-builder.sjs?html=${createFrame(
"example.net"
)}`
);
// Combine the nested frame markup created above with an example.com frame.
const TEST_URI_MARKUP = `${NESTED_FRAME_MARKUP}${createFrame("example.com")}`;
// Create the test page URI on example.org.
return `http://example.org/document-builder.sjs?html=${encodeURI(
return `https://example.org/document-builder.sjs?html=${encodeURI(
TEST_URI_MARKUP
)}`;
}