Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / test / data / extensions / api_test / notifications / has_permission_prefs / background.js
blobcbd106f91be04eed026af53c2de18ec561813380
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("granted", // permission not allowed
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.fail("Failed to show notification.");
18 notification.onshow = function() {
19 chrome.test.succeed();
22 ]);