blob: 769daf6e39c98425a1653f66ed147a2b35415ecd [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="/resources/js-test-pre.js"></script>
<script src="/resources/notifications-test-pre.js"></script>
</head>
<body>
<script>
if (!window.Notification)
testFailed("window.Notification does not exist.");
if (!window.internals)
testFailed("This test requires internals.");
internals.withUserGesture(() => {
window.Notification.requestPermission();
testPassed("Notification.requestPermission does not crash.");
});
internals.withUserGesture(() => {
testRunner.grantWebNotificationPermission(testURL);
window.Notification.requestPermission();
testPassed("Notification.requestPermission does not crash.");
});
internals.withUserGesture(() => {
testRunner.denyWebNotificationPermission(testURL);
window.Notification.requestPermission();
testPassed("Notification.requestPermission does not crash.");
});
</script>
<script src="/resources/js-test-post.js"></script>
</body>
</html>