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

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

Issue 393863002: Switch Blink to the new Web Notifications permission path. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <p> 7 <p>
8 Tests that the return values of Notification.permission match 8 Tests that the return values of Notification.permission match
9 the permission request status. 9 the permission request status.
10 </p> 10 </p>
11 <div id="console"></div> 11 <div id="console"></div>
12 <script> 12 <script>
13 if (!window.testRunner) { 13 if (!window.testRunner) {
14 testFailed("This test depends on window.testRunner to toggle per missions."); 14 testFailed("This test depends on window.testRunner to toggle per missions.");
15 } else { 15 } else {
16 testRunner.clearWebNotificationPermissions();
17
16 // The "default" state indicates that no permission request has 18 // The "default" state indicates that no permission request has
17 // been answered yet. 19 // been answered yet.
18 shouldBeEqualToString("Notification.permission", "default"); 20 shouldBeEqualToString("Notification.permission", "default");
19 21
20 window.testRunner.grantWebNotificationPermission("file://", fals e); 22 testRunner.grantWebNotificationPermission("file://", false);
21 shouldBeEqualToString("Notification.permission", "denied"); 23 shouldBeEqualToString("Notification.permission", "denied");
22 24
23 window.testRunner.grantWebNotificationPermission("file://", true ); 25 testRunner.grantWebNotificationPermission("file://", true);
24 shouldBeEqualToString("Notification.permission", "granted"); 26 shouldBeEqualToString("Notification.permission", "granted");
25 } 27 }
26 </script> 28 </script>
27 </body> 29 </body>
28 </html> 30 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698