blob: 0f4724c9b66e0501d968b3c463d1e81e6d3f393c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
<!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>
|