Bug 1735143 - Ensure various tests within devtools are https-first compliant r=bomsy

The following test suites are green in https-first with this patch:
    devtools/client/memory/test/browser/browser.ini
    devtools/client/responsive/test/browser/browser.ini
    devtools/client/shared/test/browser.ini
    devtools/client/styleeditor/test/browser.ini
    devtools/shared/commands/resource/tests/browser.ini

Differential Revision: https://phabricator.services.mozilla.com/D128082
This commit is contained in:
Julian Descottes 2021-10-13 09:41:21 +00:00
Родитель e34e298874
Коммит d99fe3e573
8 изменённых файлов: 18 добавлений и 18 удалений

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

@ -16,7 +16,7 @@ const { viewState } = require("devtools/client/memory/constants");
const { changeView } = require("devtools/client/memory/actions/view");
const TEST_URL =
"http://example.com/browser/devtools/client/memory/test/browser/doc_steady_allocation.html";
"https://example.com/browser/devtools/client/memory/test/browser/doc_steady_allocation.html";
this.test = makeMemoryTest("about:blank", async function({ tab, panel }) {
const heapWorker = panel.panelWin.gHeapAnalysesClient;

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

@ -5,7 +5,7 @@
// Verify RDM opens for a container tab.
const TEST_URL = "http://example.com/";
const TEST_URL = "https://example.com/";
addRDMTask(
null,

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

@ -6,7 +6,7 @@
// Test link helpers openDocLink, openTrustedLink.
// Use any valid test page here.
const TEST_URI = TEST_URI_ROOT + "dummy.html";
const TEST_URI = TEST_URI_ROOT_SSL + "dummy.html";
const { openDocLink, openTrustedLink } = require("devtools/client/shared/link");

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

@ -4,7 +4,7 @@
// Test that style editor loads correctly.
const TESTCASE_URI = TEST_BASE_HTTP + "longload.html";
const TESTCASE_URI = TEST_BASE_HTTPS + "longload.html";
add_task(async function() {
// launch Style Editor right when the tab is created (before load)

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

@ -55,7 +55,7 @@ add_task(async function() {
// Check that the resource command captures resources from new targets.
info("Open a first tab on the example.com domain");
const comTab = await addTab(
"http://example.com/document-builder.sjs?html=com"
"https://example.com/document-builder.sjs?html=com"
);
info("Use console.log in the example.com page");
logInTab(comTab, "test-from-example-com");
@ -73,18 +73,18 @@ add_task(async function() {
// Check that messages from new targets are still captured after calling
// unwatch for another resource.
info("Open a second tab on the example.net domain");
const netTab = await addTab(
"http://example.net/document-builder.sjs?html=net"
info("Open a second tab on the example.org domain");
const orgTab = await addTab(
"https://example.org/document-builder.sjs?html=org"
);
info("Use console.log in the example.net page");
logInTab(netTab, "test-from-example-net");
info("Use console.log in the example.org page");
logInTab(orgTab, "test-from-example-org");
info(
"Wait until onAvailable received the CONSOLE_MESSAGE resource emitted from the example.net tab"
"Wait until onAvailable received the CONSOLE_MESSAGE resource emitted from the example.org tab"
);
await waitUntil(() =>
receivedMessages.find(
resource => resource.message.arguments[0] === "test-from-example-net"
resource => resource.message.arguments[0] === "test-from-example-org"
)
);

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

@ -26,7 +26,7 @@ add_task(async function() {
});
async function testWebsocketResources(target) {
const tab = await addTab(URL_ROOT + "websocket_frontend.html");
const tab = await addTab(URL_ROOT_SSL + "websocket_frontend.html");
const { client, resourceCommand, targetCommand } = await initResourceCommand(
tab
);
@ -59,7 +59,7 @@ async function testWebsocketResources(target) {
assertResource(availableResources[0], {
wsMessageType: "webSocketOpened",
effectiveURI:
"ws://mochi.test:8888/browser/devtools/shared/commands/resource/tests/websocket_backend",
"wss://example.com/browser/devtools/shared/commands/resource/tests/websocket_backend",
extensions: "permessage-deflate",
protocols: "",
});

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

@ -16,7 +16,7 @@
function openConnection() {
return new Promise(resolve => {
webSocket = new WebSocket(
"ws://mochi.test:8888/browser/devtools/shared/commands/resource/tests/websocket_backend"
"wss://example.com/browser/devtools/shared/commands/resource/tests/websocket_backend"
);
webSocket.onopen = () => {
resolve();
@ -38,8 +38,8 @@
}
</script>
<iframe id="in-process-frame"
src="http://example.com/browser/devtools/shared/commands/resource/tests/websocket_frontend_iframe.html"></iframe>
src="https://example.com/browser/devtools/shared/commands/resource/tests/websocket_frontend_iframe.html"></iframe>
<iframe id="out-process-frame"
src="http://example.org/browser/devtools/shared/commands/resource/tests/websocket_frontend_iframe.html"></iframe>
src="https://example.org/browser/devtools/shared/commands/resource/tests/websocket_frontend_iframe.html"></iframe>
</body>
</html>

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

@ -16,7 +16,7 @@
function openConnection() {
return new Promise(resolve => {
webSocket = new WebSocket(
"ws://mochi.test:8888/browser/devtools/shared/commands/resource/tests/websocket_backend"
"wss://example.com/browser/devtools/shared/commands/resource/tests/websocket_backend"
);
webSocket.onopen = () => {
resolve();