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

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

Issue 186713002: Add new layout tests for the Web Notification API. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <p>
8 Tests that the return values of Notification.permission match the permissi on request status.
9 </p>
10 <div id="console"></div>
11 <script>
12 if (!window.testRunner) {
13 testFailed("This test depends on window.testRunner to toggle permissions .");
14 } else {
15 // The "default" state indicates that no permission request has been ans wered yet.
16 shouldBeEqualToString("Notification.permission", "default");
17
18 window.testRunner.grantWebNotificationPermission("file://", false);
19 shouldBeEqualToString("Notification.permission", "denied");
20
21 window.testRunner.grantWebNotificationPermission("file://", true);
22 shouldBeEqualToString("Notification.permission", "granted");
23 }
24 </script>
25 </body>
26 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698