Skip to content

Truly independent web browser

629 B
Raw Blame
<!DOCTYPE html>
<script src="../include.js"></script>
<script>
    asyncTest(async done => {
        await internals.setPermission("notifications", "granted");
        const notification = new Notification("With an icon", { icon: "resources/icon-16x16.png" });
        notification.onshow = () => {
            const shown = JSON.parse(internals.notificationsStateForTesting()).shown[0];
            println(`hasIcon: ${shown.hasIcon}, ${shown.iconWidth}x${shown.iconHeight}`);
            notification.close();
            done();
        };
        notification.onerror = () => { println("error"); done(); };
    });
</script>