Skip to content

Commit e4c55fb

Browse files
committed
Bug 1975980 - fix test failures due to the dom.security.https_first preference being inconsistently set, r=jmaher,necko-reviewers,sunil.
Differential Revision: https://phabricator.services.mozilla.com/D256282
1 parent 9faa09b commit e4c55fb

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

dom/manifest/test/browser_ManifestObtainer_obtain.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
"use strict";
22

3-
Services.prefs.setBoolPref("dom.manifest.enabled", true);
4-
Services.prefs.setBoolPref("dom.security.https_first", false);
3+
add_setup(async function () {
4+
await SpecialPowers.pushPrefEnv({
5+
set: [
6+
["dom.manifest.enabled", true],
7+
["dom.security.https_first", false],
8+
],
9+
});
10+
});
511

612
const { ManifestObtainer } = ChromeUtils.importESModule(
713
"resource://gre/modules/ManifestObtainer.sys.mjs"

dom/manifest/test/browser_Manifest_install.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ function generateHash(aString, hashAlg) {
3939

4040
const MANIFESTS_DIR = PathUtils.join(PathUtils.profileDir, "manifests");
4141

42+
add_setup(async function () {
43+
await SpecialPowers.pushPrefEnv({
44+
set: [["dom.security.https_first", false]],
45+
});
46+
});
47+
4248
add_task(async function () {
4349
const tabOptions = { gBrowser, url: makeTestURL() };
4450

netwerk/test/browser/browser_test_favicon.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ add_task(async function () {
1111
const pageUrl =
1212
"http://example.com/browser/netwerk/test/browser/file_favicon.html";
1313
await SpecialPowers.pushPrefEnv({
14-
set: [["network.cookie.cookieBehavior", 1]],
14+
set: [
15+
["network.cookie.cookieBehavior", 1],
16+
["dom.security.https_first", false],
17+
],
1518
});
1619

1720
let promise = TestUtils.topicObserved("cookie-rejected", subject => {

0 commit comments

Comments
 (0)