Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / test / data / extensions / api_test / notifications / has_not_permission / background.js
blob4690f5230501d8614961c89fcd5f43b78e1aa771
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 chrome.test.runTests([
6 function hasPermission() {
7 chrome.test.assertEq("default", // permission not granted
8 Notification.permission);
9 chrome.test.succeed();
11 function showTextNotification() {
12 var notification = new Notification("Foo", {
13 body: "This is a text notification."
14 });
15 notification.onerror = function() {
16 chrome.test.succeed();
18 notification.onshow = function() {
19 chrome.test.fail("Displayed a notification without permission.");
22 ]);