mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Backed out 2 changesets (bug 1843046) for causing android linting failures. CLOSED TREE
Backed out changeset 31e28d290422 (bug 1843046) Backed out changeset 5e8b64d6b91a (bug 1843046)
This commit is contained in:
parent
e7d269c437
commit
2d4db439a8
@ -477,9 +477,6 @@ NotificationPermissionRequest::Run() {
|
||||
bool blocked = false;
|
||||
if (isSystem) {
|
||||
mPermission = NotificationPermission::Granted;
|
||||
} else if (mPrincipal->GetPrivateBrowsingId() != 0) {
|
||||
mPermission = NotificationPermission::Denied;
|
||||
blocked = true;
|
||||
} else {
|
||||
// File are automatically granted permission.
|
||||
|
||||
@ -1455,12 +1452,7 @@ already_AddRefed<Promise> Notification::RequestPermission(
|
||||
aRv.Throw(NS_ERROR_UNEXPECTED);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIPrincipal> principal = sop->GetPrincipal();
|
||||
if (!principal) {
|
||||
aRv.Throw(NS_ERROR_UNEXPECTED);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RefPtr<Promise> promise = Promise::Create(window->AsGlobal(), aRv);
|
||||
if (aRv.Failed()) {
|
||||
@ -1514,14 +1506,6 @@ NotificationPermission Notification::GetPermissionInternal(
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIPrincipal> principal = sop->GetPrincipal();
|
||||
if (!principal) {
|
||||
aRv.Throw(NS_ERROR_UNEXPECTED);
|
||||
return NotificationPermission::Denied;
|
||||
}
|
||||
|
||||
if (principal->GetPrivateBrowsingId() != 0) {
|
||||
return NotificationPermission::Denied;
|
||||
}
|
||||
// Disallow showing notification if our origin is not the same origin as the
|
||||
// toplevel one, see https://github.com/whatwg/notifications/issues/177.
|
||||
if (!StaticPrefs::dom_webnotifications_allowcrossoriginiframe()) {
|
||||
|
@ -7,7 +7,6 @@ import org.hamcrest.Matchers.* // ktlint-disable no-wildcard-imports
|
||||
import org.junit.Assert.assertNotNull
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Before
|
||||
import org.junit.Ignore
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.mozilla.geckoview.GeckoResult
|
||||
@ -196,8 +195,6 @@ class WebNotificationTest : BaseSessionTest() {
|
||||
value = "true",
|
||||
),
|
||||
)
|
||||
|
||||
@Ignore // Bug 1843046 - Disabled because private notifications are temporarily disabled.
|
||||
@Test
|
||||
fun clickPrivateNotificationParceled() {
|
||||
sessionRule.setPrefsUntilTestEnd(mapOf("dom.webnotifications.vibrate.enabled" to true))
|
||||
|
Loading…
Reference in New Issue
Block a user