| Index: LayoutTests/fast/notifications/notifications-check-permission.html
|
| diff --git a/LayoutTests/fast/notifications/notifications-check-permission.html b/LayoutTests/fast/notifications/notifications-check-permission.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c893858d8e9814729ab6e5d3a74a2115ddcb1af0
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/notifications/notifications-check-permission.html
|
| @@ -0,0 +1,48 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| + <script type="text/javascript">
|
| + function log(message)
|
| + {
|
| + document.getElementById("result").innerHTML += message + "<br>";
|
| + }
|
| +
|
| + function runTests()
|
| + {
|
| + if (window.testRunner) {
|
| + testRunner.dumpAsText();
|
| + }
|
| +
|
| + if (!window.webkitNotifications) {
|
| + log("FAIL: No webkitNotifications interface!");
|
| + }
|
| +
|
| + var N = window.webkitNotifications.checkPermission();
|
| + if (N != 0) {
|
| + log("PASS: Permission not granted.");
|
| + } else {
|
| + log("FAIL: Permission shouldn't be granted.");
|
| + }
|
| +
|
| + if (window.testRunner) {
|
| + testRunner.grantWebNotificationPermission("file://");
|
| + }
|
| +
|
| + N = window.webkitNotifications.checkPermission();
|
| + if (N == 0) {
|
| + log("PASS: Permission granted.");
|
| + } else {
|
| + log("FAIL: Permission not granted.");
|
| + }
|
| + }
|
| + </script>
|
| +</head>
|
| +<body>
|
| +<p>Checking permission...</p>
|
| +<div id="result"></div>
|
| +<script type="text/javascript">
|
| +runTests();
|
| +</script>
|
| +
|
| +</body>
|
| +</html>
|
|
|