Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!DOCTYPE html>
<meta charset="utf-8">
<title>Notification permissions should be denied in non-secure contexts</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
promise_test(t => {
return Notification.requestPermission().then(result => {
assert_equals(result, "denied");
});
}, "Notification.requestPermission must be called from a secure context");
test(t => {
assert_equals(Notification.permission, "denied");
}, "Notification.permission must be called from a secure context");
</script>