OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 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. |
| 4 |
| 5 chrome.test.runTests([ |
| 6 function hasPermission() { |
| 7 chrome.test.assertEq(1, // permission not allowed |
| 8 webkitNotifications.checkPermission()); |
| 9 chrome.test.succeed(); |
| 10 }, |
| 11 function showNotification() { |
| 12 try { |
| 13 window.webkitNotifications.createHTMLNotification( |
| 14 chrome.extension.getURL("notification.html")).show(); |
| 15 } catch (e) { |
| 16 chrome.test.assertTrue(e.message.indexOf("SECURITY_ERR") == 0); |
| 17 chrome.test.succeed(); |
| 18 return; |
| 19 } |
| 20 chrome.test.fail("Expected access denied error."); |
| 21 } |
| 22 ]); |
OLD | NEW |