Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(987)

Side by Side Diff: LayoutTests/fast/notifications/notifications-check-permission.html

Issue 187323005: Revert of Remove support for legacy WebKit Notifications (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script type="text/javascript">
5 function log(message)
6 {
7 document.getElementById("result").innerHTML += message + "<br>";
8 }
9
10 function runTests()
11 {
12 if (window.testRunner) {
13 testRunner.dumpAsText();
14 }
15
16 if (!window.webkitNotifications) {
17 log("FAIL: No webkitNotifications interface!");
18 }
19
20 var N = window.webkitNotifications.checkPermission();
21 if (N != 0) {
22 log("PASS: Permission not granted.");
23 } else {
24 log("FAIL: Permission shouldn't be granted.");
25 }
26
27 if (window.testRunner) {
28 testRunner.grantWebNotificationPermission("file://");
29 }
30
31 N = window.webkitNotifications.checkPermission();
32 if (N == 0) {
33 log("PASS: Permission granted.");
34 } else {
35 log("FAIL: Permission not granted.");
36 }
37 }
38 </script>
39 </head>
40 <body>
41 <p>Checking permission...</p>
42 <div id="result"></div>
43 <script type="text/javascript">
44 runTests();
45 </script>
46
47 </body>
48 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698