Port Bug 1709150 - Linter rule to make `https` the default for all kind of tests we add. r=mkmelin

Differential Revision: https://phabricator.services.mozilla.com/D156806

--HG--
extra : rebase_source : 7f45adddcd7f3457807e5643568071199c530667
extra : amend_source : b5c7f54f6d748b969f43fb488ac5362f2c5e5c19
This commit is contained in:
Geoff Lankow 2022-09-08 21:52:37 +12:00
Родитель 4fa6e29175
Коммит 29efbc9f8f
27 изменённых файлов: 119 добавлений и 111 удалений

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

@ -123,7 +123,7 @@ add_task(async function testAttachWebPage() {
* Tests selecting a provider from the attach menu works.
*/
add_task(async function testAttachProvider() {
let fileUrl = "http://path/to/mock/file.pdf";
let fileUrl = "https://path/to/mock/file.pdf";
let iconURL = "chrome://messenger/content/extension.svg";
let provider = {
type: "Mochitest",

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

@ -21,7 +21,7 @@ const EVENTTITLE = "Event";
const EVENTLOCATION = "Location";
const EVENTDESCRIPTION = "Event Description";
const EVENTATTENDEE = "foo@bar.com";
const EVENTURL = "http://mozilla.org/";
const EVENTURL = "https://mozilla.org/";
var firstDay;
var { dayView, monthView } = CalendarTestUtils;

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

@ -125,7 +125,7 @@ function setupData() {
status: "confirmed",
freebusy: "busy",
timezonedisplay: true,
attachment: { add: "http://mozilla.org" },
attachment: { add: "https://mozilla.org" },
attendees: { add: "foo@bar.de,foo@bar.com" },
},
{

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

@ -6,6 +6,8 @@
* Test that the IMIP bar behaves properly for eml files with invites.
*/
/* eslint-disable @microsoft/sdl/no-insecure-url */
function getFileFromChromeURL(leafName) {
let ChromeRegistry = Cc["@mozilla.org/chrome/chrome-registry;1"].getService(Ci.nsIChromeRegistry);

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

@ -2,6 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at http://mozilla.org/MPL/2.0/. */
/* eslint-disable @microsoft/sdl/no-insecure-url */
let { MockRegistrar } = ChromeUtils.import(
"resource://testing-common/MockRegistrar.jsm"
);

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

@ -733,7 +733,7 @@ add_task(async function testGoogleEscaping() {
TITLE:title\\:title\\;title\\,title\\\\title\\\\\\:title\\\\\\;title\\\\\\,title\\\\\\\\
TEL:tel\\:0123\\\\4567
NOTE:notes\\:\\nnotes\\;\\nnotes\\,\\nnotes\\\\
URL:http\\://host/url\\:url\\;url\\,url\\\\url
URL:https\\://host/url\\:url\\;url\\,url\\\\url
END:VCARD
`)
);
@ -803,7 +803,7 @@ add_task(async function testGoogleEscaping() {
Assert.equal(items.length, 1);
Assert.equal(
items[0].children[1].querySelector("a").href,
"http://host/url:url;url,url/url"
"https://host/url:url;url,url/url"
);
Assert.equal(
items[0].children[1].querySelector("a").textContent,
@ -817,7 +817,7 @@ add_task(async function testGoogleEscaping() {
);
await TestUtils.waitForCondition(
() =>
mockExternalProtocolService.urlLoaded("http://host/url:url;url,url/url"),
mockExternalProtocolService.urlLoaded("https://host/url:url;url,url/url"),
"attempted to load website in a browser"
);

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

@ -2327,7 +2327,7 @@ add_task(async function test_vCard_fields() {
await setVCardInputValues({
impp: [{ value: "matrix:u/contact1:example.com" }],
url: [{ value: "http://www.example.com" }],
url: [{ value: "https://www.example.com" }],
tel: [{ value: "+123456 789" }],
note: [{ value: "A note to this contact" }],
specialDate: [
@ -2350,7 +2350,7 @@ add_task(async function test_vCard_fields() {
checkVCardValues(book.childCards[0], {
impp: [{ value: "matrix:u/contact1:example.com" }],
url: [{ value: "http://www.example.com" }],
url: [{ value: "https://www.example.com" }],
tel: [{ value: "+123456 789" }],
note: [{ value: "A note to this contact" }],
bday: [{ value: "2000-03-31" }],
@ -2394,7 +2394,7 @@ add_task(async function test_vCard_fields() {
checkVCardInputValues({
impp: [{ value: "matrix:u/contact1:example.com" }],
url: [{ value: "http://www.example.com" }],
url: [{ value: "https://www.example.com" }],
tel: [{ value: "+123456 789" }],
note: [{ value: "A note to this contact" }],
specialDate: [
@ -2419,7 +2419,7 @@ add_task(async function test_vCard_fields() {
{ value: "xmpp:test@example.com" },
],
url: [
{ value: "http://example.com" },
{ value: "https://example.com" },
{ value: "https://hello", type: "home" },
{ value: "https://www.example.invalid", type: "work" },
],
@ -2456,7 +2456,7 @@ add_task(async function test_vCard_fields() {
{ value: "xmpp:test@example.com" },
],
url: [
{ value: "http://example.com" },
{ value: "https://example.com" },
{ value: "https://hello", type: "home" },
{ value: "https://www.example.invalid", type: "work" },
],
@ -2516,7 +2516,7 @@ add_task(async function test_vCard_fields() {
await setVCardInputValues({
impp: [{ value: "invalid:example.com" }],
url: [{ value: "http://www.thunderbird.net" }],
url: [{ value: "https://www.thunderbird.net" }],
tel: [{ value: "650-903-0800" }],
note: [{ value: "Another note\nfor contact 2" }],
specialDate: [
@ -2540,7 +2540,7 @@ add_task(async function test_vCard_fields() {
{ value: "xmpp:test@example.com" },
],
url: [
{ value: "http://example.com" },
{ value: "https://example.com" },
{ value: "https://hello", type: "home" },
{ value: "https://www.example.invalid", type: "work" },
],
@ -2569,7 +2569,7 @@ add_task(async function test_vCard_fields() {
checkVCardValues(book.childCards[1], {
impp: [{ value: "invalid:example.com" }],
url: [{ value: "http://www.thunderbird.net" }],
url: [{ value: "https://www.thunderbird.net" }],
tel: [{ value: "650-903-0800" }],
note: [{ value: "Another note\nfor contact 2" }],
bday: [{ value: "1966-12-15" }],
@ -2592,7 +2592,7 @@ add_task(async function test_vCard_fields() {
{ value: "xmpp:test@example.com" },
],
url: [
{ value: "http://example.com" },
{ value: "https://example.com" },
{ value: "https://hello", type: "home" },
{ value: "https://www.example.invalid", type: "work" },
],
@ -2651,7 +2651,7 @@ add_task(async function test_vCard_fields() {
checkVCardValues(book.childCards[1], {
impp: [{ value: "invalid:example.com" }],
url: [{ value: "http://www.thunderbird.net" }],
url: [{ value: "https://www.thunderbird.net" }],
tel: [{ value: "650-903-0800" }],
note: [{ value: "Another note\nfor contact 2" }],
bday: [{ value: "1966-12-15" }],
@ -2668,7 +2668,7 @@ add_task(async function test_vCard_fields() {
checkVCardInputValues({
impp: [{ value: "invalid:example.com" }],
url: [{ value: "http://www.thunderbird.net" }],
url: [{ value: "https://www.thunderbird.net" }],
tel: [{ value: "650-903-0800" }],
note: [{ value: "Another note\nfor contact 2" }],
specialDate: [
@ -2685,7 +2685,7 @@ add_task(async function test_vCard_fields() {
await setVCardInputValues({
impp: [{ value: "" }],
url: [
{ value: "http://www.thunderbird.net" },
{ value: "https://www.thunderbird.net" },
{ value: "www.another.url", type: "work" },
],
tel: [{ value: "650-903-0800" }, { value: "+123 456 789", type: "home" }],
@ -2720,7 +2720,7 @@ add_task(async function test_vCard_fields() {
checkVCardValues(book.childCards[1], {
impp: [{ value: "invalid:example.com" }],
url: [{ value: "http://www.thunderbird.net" }],
url: [{ value: "https://www.thunderbird.net" }],
tel: [{ value: "650-903-0800" }],
note: [{ value: "Another note\nfor contact 2" }],
bday: [{ value: "1966-12-15" }],
@ -2737,7 +2737,7 @@ add_task(async function test_vCard_fields() {
checkVCardInputValues({
impp: [{ value: "invalid:example.com" }],
url: [{ value: "http://www.thunderbird.net" }],
url: [{ value: "https://www.thunderbird.net" }],
tel: [{ value: "650-903-0800" }],
note: [{ value: "Another note\nfor contact 2" }],
specialDate: [
@ -2770,7 +2770,7 @@ add_task(async function test_vCard_fields() {
checkVCardValues(book.childCards[1], {
impp: [{ value: "invalid:example.com" }],
url: [{ value: "http://www.thunderbird.net" }],
url: [{ value: "https://www.thunderbird.net" }],
tel: [{ value: "650-903-0800" }],
note: [{ value: "Another note\nfor contact 2" }],
bday: [{ value: "1966-12-15" }],
@ -2878,7 +2878,7 @@ add_task(async function test_type_selection() {
{ value: "work.contact1@invalid", type: "work" },
],
url: [
{ value: "http://none.example.com" },
{ value: "https://none.example.com" },
{ value: "https://home.example.com", type: "home" },
{ value: "https://work.example.com", type: "work" },
],
@ -2902,7 +2902,7 @@ add_task(async function test_type_selection() {
{ value: "work.contact1@invalid", type: "work" },
],
url: [
{ value: "http://none.example.com" },
{ value: "https://none.example.com" },
{ value: "https://home.example.com", type: "home" },
{ value: "https://work.example.com", type: "work" },
],
@ -2926,7 +2926,7 @@ add_task(async function test_type_selection() {
{ value: "work.contact1@invalid", type: "work" },
],
url: [
{ value: "http://none.example.com" },
{ value: "https://none.example.com" },
{ value: "https://home.example.com", type: "home" },
{ value: "https://work.example.com", type: "work" },
],
@ -2947,7 +2947,7 @@ add_task(async function test_type_selection() {
{ value: "work.contact1@invalid", type: "home" },
],
url: [
{ value: "http://none.example.com", type: "work" },
{ value: "https://none.example.com", type: "work" },
{ value: "https://home.example.com" },
{ value: "https://work.example.com", type: "home" },
],
@ -2971,7 +2971,7 @@ add_task(async function test_type_selection() {
{ value: "work.contact1@invalid", type: "home" },
],
url: [
{ value: "http://none.example.com", type: "work" },
{ value: "https://none.example.com", type: "work" },
{ value: "https://home.example.com" },
{ value: "https://work.example.com", type: "home" },
],
@ -3271,7 +3271,7 @@ add_task(async function testGoogleEscaping() {
TEL:tel\\:0123\\\\4567
EMAIL:test\\\\test@invalid
NOTE:notes\\:\\nnotes\\;\\nnotes\\,\\nnotes\\\\
URL:http\\://host/url\\:url\\;url\\,url\\\\url
URL:https\\://host/url\\:url\\;url\\,url\\\\url
END:VCARD
`)
);
@ -3300,7 +3300,7 @@ add_task(async function testGoogleEscaping() {
tel: [{ value: "tel:0123\\4567" }],
email: [{ value: "test\\test@invalid" }],
note: [{ value: "notes:\nnotes;\nnotes,\nnotes\\" }],
url: [{ value: "http://host/url:url;url,url\\url" }],
url: [{ value: "https://host/url:url;url,url\\url" }],
});
await closeAddressBookWindow();

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

@ -47,8 +47,8 @@ async function test_cookie_settings({
thirdPartyCookiesEnabled,
cookieJarSettingsLocked,
}) {
let firstPartyURI = NetUtil.newURI("http://example.com/");
let thirdPartyURI = NetUtil.newURI("http://example.org/");
let firstPartyURI = NetUtil.newURI("https://example.com/");
let thirdPartyURI = NetUtil.newURI("https://example.org/");
let channel = NetUtil.newChannel({
uri: firstPartyURI,
loadUsingSystemPrincipal: true,

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

@ -2,6 +2,8 @@
* http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
/* eslint-disable @microsoft/sdl/no-insecure-url */
const BASE_URL =
"http://mochi.test:8888/browser/comm/mail/components/enterprisepolicies/tests/browser/";

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

@ -137,7 +137,7 @@ add_task(async function test_bad_web_handler1() {
handlers: [
{
name: "Name",
uriTemplate: "http://www.example.org/?%s",
uriTemplate: "https://www.example.org/?%s",
},
],
},
@ -166,7 +166,7 @@ add_task(async function test_bad_web_handler2() {
handlers: [
{
name: "Name",
uriTemplate: "http://www.example.org/",
uriTemplate: "https://www.example.org/",
},
],
},

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

@ -23,7 +23,7 @@ function checkIsDefaultMenuItemVisible(visibleMenuItemIds) {
add_task(async function overrideContext_with_context() {
// Background script of the main test extension and the auxiliary other extension.
function background() {
const HTTP_URL = "http://example.com/?SomeTab";
const HTTP_URL = "https://example.com/?SomeTab";
browser.test.onMessage.addListener(async (msg, tabId) => {
browser.test.assertEq(
"testTabAccess",
@ -164,7 +164,7 @@ add_task(async function overrideContext_with_context() {
`,
"tab.js": async () => {
let [tab] = await browser.tabs.query({
url: "http://example.com/?SomeTab",
url: "https://example.com/?SomeTab",
});
let testCases = [
{
@ -197,7 +197,7 @@ add_task(async function overrideContext_with_context() {
background,
});
let { browser } = window.openContentTab("http://example.com/?SomeTab");
let { browser } = window.openContentTab("https://example.com/?SomeTab");
await BrowserTestUtils.browserLoaded(browser);
let otherExtension = ExtensionTestUtils.loadExtension({

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

@ -231,20 +231,20 @@ add_task(async function testMultipleContentTabs() {
expectedUrl: browser.runtime.getURL("test.html"),
},
{
url: "http://www.example.com",
expectedUrl: "http://www.example.com/",
url: "https://www.example.com",
expectedUrl: "https://www.example.com/",
},
{
url: "http://www.example.com",
expectedUrl: "http://www.example.com/",
url: "https://www.example.com",
expectedUrl: "https://www.example.com/",
},
{
url: "http://www.example.com/",
expectedUrl: "http://www.example.com/",
url: "https://www.example.com/",
expectedUrl: "https://www.example.com/",
},
{
url: "http://www.example.com/",
expectedUrl: "http://www.example.com/",
url: "https://www.example.com/",
expectedUrl: "https://www.example.com/",
},
{
url: "https://www.example.com/",

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

@ -40,6 +40,7 @@ add_task(async () => {
let extension = ExtensionTestUtils.loadExtension({
async background() {
const urls = {
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
"http://www.google.de/": true,
"https://www.google.de/": true,
"ftp://www.google.de/": false,

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

@ -6,6 +6,7 @@
* Ensures that attachment events are fired properly
*/
/* eslint-disable @microsoft/sdl/no-insecure-url */
/* globals gFolderTreeView */
"use strict";

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

@ -231,7 +231,7 @@ add_setup(async function() {
create_enclosure_attachment(
"purr.mp3",
"audio/mpeg",
"http://example.com",
"https://example.com",
12345678
),
]);
@ -241,7 +241,7 @@ add_setup(async function() {
create_enclosure_attachment(
"meow.mp3",
"audio/mpeg",
"http://example.com/invalid"
"https://example.com/invalid"
),
]
);
@ -251,13 +251,13 @@ add_setup(async function() {
create_enclosure_attachment(
"purr.mp3",
"audio/mpeg",
"http://example.com",
"https://example.com",
1234567
),
create_enclosure_attachment(
"meow.mp3",
"audio/mpeg",
"http://example.com",
"https://example.com",
987654321
),
]
@ -268,13 +268,13 @@ add_setup(async function() {
create_enclosure_attachment(
"purr.mp3",
"audio/mpeg",
"http://example.com",
"https://example.com",
1234567
),
create_enclosure_attachment(
"meow.mp3",
"audio/mpeg",
"http://example.com/invalid"
"https://example.com/invalid"
),
]
);
@ -284,12 +284,12 @@ add_setup(async function() {
create_enclosure_attachment(
"purr.mp3",
"audio/mpeg",
"http://example.com/invalid"
"https://example.com/invalid"
),
create_enclosure_attachment(
"meow.mp3",
"audio/mpeg",
"http://example.com/invalid"
"https://example.com/invalid"
),
]
);

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

@ -394,14 +394,14 @@ function subtest_errors_during_rename(error) {
uploads,
[
{
url: "http://www.example.com/providerA/testFile1",
url: "https://www.example.com/providerA/testFile1",
name: "testFile1",
serviceIcon: "chrome://messenger/skin/icons/globe.svg",
serviceName: "MochiTest A",
serviceUrl: "https://www.provider-A.org",
},
{
url: "http://www.example.com/providerA/testFile2",
url: "https://www.example.com/providerA/testFile2",
name: "testFile2",
serviceIcon: "chrome://messenger/skin/icons/globe.svg",
serviceName: "MochiTest A",

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

@ -381,7 +381,7 @@ function prepare_some_attachments_and_reply(aText, aFiles) {
uploads,
[
{
url: "http://www.example.com/providerF/testFile1",
url: "https://www.example.com/providerF/testFile1",
name: "testFile1",
serviceName: "MochiTest F",
serviceIcon: "chrome://messenger/skin/icons/globe.svg",
@ -389,7 +389,7 @@ function prepare_some_attachments_and_reply(aText, aFiles) {
downloadLimit: 2,
},
{
url: "http://www.example.com/providerF/testFile2",
url: "https://www.example.com/providerF/testFile2",
name: "testFile2",
serviceName: "MochiTest F",
serviceIcon: "chrome://messenger/skin/icons/globe.svg",
@ -445,7 +445,7 @@ function prepare_some_attachments_and_forward(aText, aFiles) {
uploads,
[
{
url: "http://www.example.com/providerG/testFile1",
url: "https://www.example.com/providerG/testFile1",
name: "testFile1",
serviceName: "MochiTest G",
serviceIcon: "chrome://messenger/skin/icons/globe.svg",
@ -453,7 +453,7 @@ function prepare_some_attachments_and_forward(aText, aFiles) {
downloadExpiryDate: { timestamp: 1639827408073 },
},
{
url: "http://www.example.com/providerG/testFile2",
url: "https://www.example.com/providerG/testFile2",
name: "testFile2",
serviceName: "MochiTest G",
serviceIcon: "chrome://messenger/skin/icons/globe.svg",
@ -557,7 +557,7 @@ function subtest_inserts_linebreak_on_empty_compose() {
uploads,
[
{
url: "http://www.example.com/someKey/testFile1",
url: "https://www.example.com/someKey/testFile1",
name: "testFile1",
serviceName: "default",
serviceIcon: "chrome://messenger/content/extension.svg",
@ -565,7 +565,7 @@ function subtest_inserts_linebreak_on_empty_compose() {
downloadPasswordProtected: false,
},
{
url: "http://www.example.com/someKey/testFile2",
url: "https://www.example.com/someKey/testFile2",
name: "testFile2",
serviceName: "default",
serviceIcon: "chrome://messenger/content/extension.svg",
@ -615,7 +615,7 @@ add_task(function test_inserts_linebreak_on_empty_compose_with_signature() {
uploads,
[
{
url: "http://www.example.com/someKey/testFile1",
url: "https://www.example.com/someKey/testFile1",
name: "testFile1",
serviceName: "default",
serviceIcon: "chrome://messenger/content/extension.svg",
@ -623,7 +623,7 @@ add_task(function test_inserts_linebreak_on_empty_compose_with_signature() {
downloadPasswordProtected: true,
},
{
url: "http://www.example.com/someKey/testFile2",
url: "https://www.example.com/someKey/testFile2",
name: "testFile2",
serviceName: "default",
serviceIcon: "chrome://messenger/content/extension.svg",
@ -673,7 +673,7 @@ add_task(function test_inserts_linebreak_on_empty_compose_with_signature() {
uploads,
[
{
url: "http://www.example.com/someKey/testFile1",
url: "https://www.example.com/someKey/testFile1",
name: "testFile1",
serviceIcon: "chrome://messenger/content/extension.svg",
serviceName: "default",
@ -681,7 +681,7 @@ add_task(function test_inserts_linebreak_on_empty_compose_with_signature() {
downloadPasswordProtected: true,
},
{
url: "http://www.example.com/someKey/testFile2",
url: "https://www.example.com/someKey/testFile2",
name: "testFile2",
serviceIcon: "chrome://messenger/content/extension.svg",
serviceName: "default",
@ -778,14 +778,14 @@ function subtest_adding_filelinks_to_written_message() {
uploads,
[
{
url: "http://www.example.com/someKey/testFile1",
url: "https://www.example.com/someKey/testFile1",
name: "testFile1",
serviceName: "default",
serviceIcon: "chrome://messenger/content/extension.svg",
serviceUrl: "",
},
{
url: "http://www.example.com/someKey/testFile2",
url: "https://www.example.com/someKey/testFile2",
name: "testFile2",
serviceName: "default",
serviceIcon: "chrome://messenger/content/extension.svg",
@ -1166,14 +1166,14 @@ function subtest_converting_filelink_updates_urls() {
uploads,
[
{
url: "http://www.example.com/providerA/testFile1",
url: "https://www.example.com/providerA/testFile1",
name: "testFile1",
serviceIcon: "chrome://messenger/skin/icons/globe.svg",
serviceName: "MochiTest A",
serviceUrl: "https://www.provider-A.org",
},
{
url: "http://www.example.com/providerA/testFile2",
url: "https://www.example.com/providerA/testFile2",
name: "testFile2",
serviceIcon: "chrome://messenger/skin/icons/globe.svg",
serviceName: "MochiTest A",
@ -1194,14 +1194,14 @@ function subtest_converting_filelink_updates_urls() {
uploads,
[
{
url: "http://www.example.com/providerB/testFile1",
url: "https://www.example.com/providerB/testFile1",
name: "testFile1",
serviceIcon: "chrome://messenger/content/extension.svg",
serviceName: "MochiTest B",
serviceUrl: "https://www.provider-B.org",
},
{
url: "http://www.example.com/providerB/testFile2",
url: "https://www.example.com/providerB/testFile2",
name: "testFile2",
serviceIcon: "chrome://messenger/content/extension.svg",
serviceName: "MochiTest B",
@ -1248,7 +1248,7 @@ function subtest_renaming_filelink_updates_urls() {
uploads,
[
{
url: "http://www.example.com/providerA/testFile1",
url: "https://www.example.com/providerA/testFile1",
name: "testFile1",
serviceName: "MochiTest A",
serviceIcon: "chrome://messenger/skin/icons/globe.svg",
@ -1259,7 +1259,7 @@ function subtest_renaming_filelink_updates_urls() {
},
},
{
url: "http://www.example.com/providerA/testFile2",
url: "https://www.example.com/providerA/testFile2",
name: "testFile2",
serviceName: "MochiTest A",
serviceIcon: "chrome://messenger/skin/icons/globe.svg",
@ -1293,7 +1293,7 @@ function subtest_renaming_filelink_updates_urls() {
uploads,
[
{
url: "http://www.example.com/providerA/testFile1Renamed",
url: "https://www.example.com/providerA/testFile1Renamed",
name: "testFile1Renamed",
serviceIcon: "chrome://messenger/skin/icons/globe.svg",
serviceName: "MochiTest A",
@ -1304,7 +1304,7 @@ function subtest_renaming_filelink_updates_urls() {
},
},
{
url: "http://www.example.com/providerA/testFile2Renamed",
url: "https://www.example.com/providerA/testFile2Renamed",
name: "testFile2Renamed",
serviceIcon: "chrome://messenger/skin/icons/globe.svg",
serviceName: "MochiTest A",
@ -1358,14 +1358,14 @@ function subtest_converting_filelink_to_normal_removes_url() {
uploads,
[
{
url: "http://www.example.com/providerC/testFile1",
url: "https://www.example.com/providerC/testFile1",
name: "testFile1",
serviceName: "MochiTest C",
serviceIcon: "chrome://messenger/skin/icons/globe.svg",
serviceUrl: "https://www.provider-C.org",
},
{
url: "http://www.example.com/providerC/testFile2",
url: "https://www.example.com/providerC/testFile2",
name: "testFile2",
serviceName: "MochiTest C",
serviceIcon: "chrome://messenger/skin/icons/globe.svg",
@ -1435,14 +1435,14 @@ function subtest_filelinks_work_after_manual_removal() {
uploads,
[
{
url: "http://www.example.com/providerD/testFile1",
url: "https://www.example.com/providerD/testFile1",
name: "testFile1",
serviceName: "MochiTest D",
serviceIcon: "chrome://messenger/skin/icons/globe.svg",
serviceUrl: "https://www.provider-D.org",
},
{
url: "http://www.example.com/providerD/testFile2",
url: "https://www.example.com/providerD/testFile2",
name: "testFile2",
serviceName: "MochiTest D",
serviceIcon: "chrome://messenger/skin/icons/globe.svg",
@ -1462,7 +1462,7 @@ function subtest_filelinks_work_after_manual_removal() {
uploads,
[
{
url: "http://www.example.com/providerD/testFile3",
url: "https://www.example.com/providerD/testFile3",
name: "testFile3",
serviceIcon: "chrome://messenger/skin/icons/globe.svg",
serviceName: "MochiTest D",
@ -1514,14 +1514,14 @@ function subtest_insertion_restores_caret_point() {
uploads,
[
{
url: "http://www.example.com/providerE/testFile1",
url: "https://www.example.com/providerE/testFile1",
name: "testFile1",
serviceName: "MochiTest E",
serviceIcon: "chrome://messenger/content/extension.svg",
serviceUrl: "https://www.provider-E.org",
},
{
url: "http://www.example.com/providerE/testFile2",
url: "https://www.example.com/providerE/testFile2",
name: "testFile2",
serviceName: "MochiTest E",
serviceIcon: "chrome://messenger/content/extension.svg",

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

@ -105,9 +105,9 @@ add_task(async function test_filelink_ignored() {
);
// Multiple big attachments should be counted as one ignoring.
add_attachments(cwc, "http://www.example.com/1", maxSize);
add_attachments(cwc, "http://www.example.com/2", maxSize + 10);
add_attachments(cwc, "http://www.example.com/3", maxSize - 1);
add_attachments(cwc, "https://www.example.com/1", maxSize);
add_attachments(cwc, "https://www.example.com/2", maxSize + 10);
add_attachments(cwc, "https://www.example.com/3", maxSize - 1);
let aftersend = BrowserTestUtils.waitForEvent(cwc.window, "aftersend");
cwc.click(cwc.e("button-send"));
await aftersend;

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

@ -141,16 +141,16 @@ function close_privacy_warning_notification(aController) {
add_task(function test_no_notification_for_small_file() {
let cwc = open_compose_new_mail(mc);
add_attachments(cwc, "http://www.example.com/1", 0);
add_attachments(cwc, "https://www.example.com/1", 0);
assert_cloudfile_notification_displayed(cwc, false);
add_attachments(cwc, "http://www.example.com/2", 1);
add_attachments(cwc, "https://www.example.com/2", 1);
assert_cloudfile_notification_displayed(cwc, false);
add_attachments(cwc, "http://www.example.com/3", 100);
add_attachments(cwc, "https://www.example.com/3", 100);
assert_cloudfile_notification_displayed(cwc, false);
add_attachments(cwc, "http://www.example.com/4", 500);
add_attachments(cwc, "https://www.example.com/4", 500);
assert_cloudfile_notification_displayed(cwc, false);
close_compose_window(cwc);
@ -158,16 +158,16 @@ add_task(function test_no_notification_for_small_file() {
add_task(function test_notification_for_big_files() {
let cwc = open_compose_new_mail(mc);
add_attachments(cwc, "http://www.example.com/1", maxSize);
add_attachments(cwc, "https://www.example.com/1", maxSize);
assert_cloudfile_notification_displayed(cwc, true);
add_attachments(cwc, "http://www.example.com/2", maxSize + 1000);
add_attachments(cwc, "https://www.example.com/2", maxSize + 1000);
assert_cloudfile_notification_displayed(cwc, true);
add_attachments(cwc, "http://www.example.com/3", maxSize + 10000);
add_attachments(cwc, "https://www.example.com/3", maxSize + 10000);
assert_cloudfile_notification_displayed(cwc, true);
add_attachments(cwc, "http://www.example.com/4", maxSize + 100000);
add_attachments(cwc, "https://www.example.com/4", maxSize + 100000);
assert_cloudfile_notification_displayed(cwc, true);
close_compose_window(cwc);
@ -175,13 +175,13 @@ add_task(function test_notification_for_big_files() {
add_task(function test_graduate_to_notification() {
let cwc = open_compose_new_mail(mc);
add_attachments(cwc, "http://www.example.com/1", maxSize - 100);
add_attachments(cwc, "https://www.example.com/1", maxSize - 100);
assert_cloudfile_notification_displayed(cwc, false);
add_attachments(cwc, "http://www.example.com/2", maxSize - 25);
add_attachments(cwc, "https://www.example.com/2", maxSize - 25);
assert_cloudfile_notification_displayed(cwc, false);
add_attachments(cwc, "http://www.example.com/3", maxSize);
add_attachments(cwc, "https://www.example.com/3", maxSize);
assert_cloudfile_notification_displayed(cwc, true);
close_compose_window(cwc);
@ -191,16 +191,16 @@ add_task(function test_no_notification_if_disabled() {
Services.prefs.setBoolPref("mail.cloud_files.enabled", false);
let cwc = open_compose_new_mail(mc);
add_attachments(cwc, "http://www.example.com/1", maxSize);
add_attachments(cwc, "https://www.example.com/1", maxSize);
assert_cloudfile_notification_displayed(cwc, false);
add_attachments(cwc, "http://www.example.com/2", maxSize + 1000);
add_attachments(cwc, "https://www.example.com/2", maxSize + 1000);
assert_cloudfile_notification_displayed(cwc, false);
add_attachments(cwc, "http://www.example.com/3", maxSize + 10000);
add_attachments(cwc, "https://www.example.com/3", maxSize + 10000);
assert_cloudfile_notification_displayed(cwc, false);
add_attachments(cwc, "http://www.example.com/4", maxSize + 100000);
add_attachments(cwc, "https://www.example.com/4", maxSize + 100000);
assert_cloudfile_notification_displayed(cwc, false);
close_compose_window(cwc);

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

@ -206,7 +206,7 @@ add_task(function test_file_attachment() {
add_task(function test_webpage_attachment() {
let cwc = open_compose_new_mail();
add_attachments(cwc, "http://www.mozilla.org/");
add_attachments(cwc, "https://www.mozilla.org/");
check_no_attachment_size(cwc, 0);
check_total_attachment_size(cwc, 1);

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

@ -65,7 +65,7 @@ async function checkFocusCycling(controller, options) {
);
if (options.attachment) {
add_attachments(controller, "http://www.mozilla.org/");
add_attachments(controller, "https://www.mozilla.org/");
}
if (options.contacts) {

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

@ -75,7 +75,7 @@ add_setup(async function() {
clobberHeaders: {
Newsgroups: "alt.test",
"Reply-To": "J. Doe <j.doe@momo.invalid>",
"Content-Base": "http://example.com/",
"Content-Base": "https://example.com/",
Bcc: "Richard Roe <richard.roe@momo.invalid>",
},
});

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

@ -97,7 +97,7 @@ MockCloudfileAccount.prototype = {
}
let upload = this._uploads.get(uploadId);
upload.url = `http://www.example.com/${this.accountKey}/${newName}`;
upload.url = `https://www.example.com/${this.accountKey}/${newName}`;
upload.name = newName;
return upload;
},
@ -142,7 +142,7 @@ MockCloudfileAccount.prototype = {
},
urlForFile(aFile) {
return `http://www.example.com/${this.accountKey}/${aFile.leafName}`;
return `https://www.example.com/${this.accountKey}/${aFile.leafName}`;
},
cancelFileUpload(window, aUploadId) {

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

@ -148,7 +148,7 @@ add_task(async function() {
// Open a content tab.
eventPromise = BrowserTestUtils.waitForEvent(tabmail.tabContainer, "TabOpen");
contentTab = window.openContentTab("http://example.org/");
contentTab = window.openContentTab("https://example.org/");
contentTabPanel = contentTab.browser.closest(".contentTabInstance")
.parentNode;
event = await eventPromise;

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

@ -90,7 +90,7 @@ add_task(async () => {
EventUtils.synthesizeMouseAtCenter(locationInput, {}, dialogWindow);
await TestUtils.waitForCondition(() => !addFeedButton.disabled);
EventUtils.sendString(
"http://example.org/browser/comm/mailnews/extensions/newsblog/test/browser/data/rss.xml",
"https://example.org/browser/comm/mailnews/extensions/newsblog/test/browser/data/rss.xml",
dialogWindow
);
EventUtils.synthesizeKey("VK_TAB", {}, dialogWindow);
@ -170,7 +170,7 @@ add_task(async () => {
await BrowserTestUtils.synthesizeMouseAtCenter("a", {}, messagePane);
Assert.deepEqual(mockExternalProtocolService._loadedURLs, [
"http://example.org/link/from/description",
"https://example.org/link/from/description",
]);
mockExternalProtocolService._loadedURLs.length = 0;
@ -196,7 +196,7 @@ add_task(async () => {
});
await BrowserTestUtils.synthesizeMouseAtCenter("a", {}, messagePane);
Assert.deepEqual(mockExternalProtocolService._loadedURLs, [
"http://example.org/link/from/article",
"https://example.org/link/from/article",
]);
mockExternalProtocolService._loadedURLs.length = 0;

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

@ -6,7 +6,7 @@
</head>
<body>
<p>This is the article.</p>
<p><a href="http://example.org/link/from/article">Here's a link.</a></p>
<p><a href="https://example.org/link/from/article">Here's a link.</a></p>
<script>
document.body.style.backgroundColor = "green";
</script>

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

@ -2,19 +2,19 @@
<rss version="2.0">
<channel>
<title>Test Feed</title>
<link>http://example.org/</link>
<link>https://example.org/</link>
<description></description>
<lastBuildDate>Thu, 21 Jan 2021 17:57:54 +0000</lastBuildDate>
<language>en-US</language>
<item>
<title>Test Article</title>
<link>http://example.org/browser/comm/mailnews/extensions/newsblog/test/browser/data/article.html</link>
<link>https://example.org/browser/comm/mailnews/extensions/newsblog/test/browser/data/article.html</link>
<pubDate>Wed, 20 Jan 2021 17:00:39 +0000</pubDate>
<description><![CDATA[
<p>This is the description.</p>
<p><a href="http://example.org/link/from/description">Here's a link.</a></p>
<p><a href="https://example.org/link/from/description">Here's a link.</a></p>
<script>
document.body.style.backgroundColor = "red";
</script>