зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1587045 - Remove dom.webnotifications.allowinsecure pref r=dom-core,edgar
Differential Revision: https://phabricator.services.mozilla.com/D183817
This commit is contained in:
Родитель
cb35f4c982
Коммит
f2e760e8f6
|
@ -483,8 +483,7 @@ NotificationPermissionRequest::Run() {
|
|||
|
||||
if (mPrincipal->SchemeIs("file")) {
|
||||
mPermission = NotificationPermission::Granted;
|
||||
} else if (!StaticPrefs::dom_webnotifications_allowinsecure() &&
|
||||
!mWindow->IsSecureContext()) {
|
||||
} else if (!mWindow->IsSecureContext()) {
|
||||
mPermission = NotificationPermission::Denied;
|
||||
blocked = true;
|
||||
nsCOMPtr<Document> doc = mWindow->GetExtantDoc();
|
||||
|
|
|
@ -10,9 +10,9 @@ skip-if = toolkit == 'android' # Bug 1531097
|
|||
[test_notification_basics.html]
|
||||
skip-if = xorigin # Bug 1792790
|
||||
[test_notification_crossorigin_iframe.html]
|
||||
scheme=https
|
||||
# This test needs to be run on HTTP (not HTTPS).
|
||||
[test_notification_insecure_context.html]
|
||||
fail-if = xorigin
|
||||
skip-if =
|
||||
http3
|
||||
http2
|
||||
|
|
|
@ -17,13 +17,12 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1560741
|
|||
<script class="testbody" type="text/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
const kBlankURL = "https://example.com/tests/dom/notification/test/mochitest/blank.html";
|
||||
const kBlankURL = "https://example.org/tests/dom/notification/test/mochitest/blank.html";
|
||||
|
||||
(async function runTest() {
|
||||
await SpecialPowers.pushPrefEnv({"set": [
|
||||
["notification.prompt.testing", true],
|
||||
["notification.prompt.testing.allow", true],
|
||||
["dom.webnotifications.allowinsecure", true],
|
||||
]});
|
||||
|
||||
let iframe = document.createElement("iframe");
|
||||
|
|
|
@ -31,11 +31,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1429432
|
|||
let response = await Notification.requestPermission();
|
||||
is(response, "denied", "Denied permission in insecure context");
|
||||
|
||||
await SpecialPowers.pushPrefEnv({"set": [["dom.webnotifications.allowinsecure", true]]});
|
||||
|
||||
response = await Notification.requestPermission();
|
||||
is(response, "granted", "Granted permission in insecure context with pref set");
|
||||
|
||||
script.sendAsyncMessage("destroy");
|
||||
script.destroy();
|
||||
|
||||
|
|
|
@ -4666,11 +4666,6 @@
|
|||
value: true
|
||||
mirror: always
|
||||
|
||||
- name: dom.webnotifications.allowinsecure
|
||||
type: RelaxedAtomicBool
|
||||
value: false
|
||||
mirror: always
|
||||
|
||||
- name: dom.webnotifications.allowcrossoriginiframe
|
||||
type: RelaxedAtomicBool
|
||||
value: false
|
||||
|
|
Загрузка…
Ссылка в новой задаче