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

Side by Side Diff: LayoutTests/http/tests/push_messaging/has_permission_denied.html

Issue 783983003: Push API: move PushManager from Navigator to ServiceWorkerRegistration [switchover 6/6] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address review comments. Created 6 years 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 <title>Push API: hasPermission fulfills with denied when permission is denied</t itle>
Peter Beverloo 2014/12/10 00:18:17 nit: s/fulfills/resolves/ (In the test's descripti
Michael van Ouwerkerk 2014/12/10 15:13:06 Done.
5 <link rel="manifest" href="resources/push_manifest.json">
6 <script src="../resources/testharness.js"></script>
7 <script src="../resources/testharnessreport.js"></script>
8 <script src="../serviceworker/resources/test-helpers.js"></script>
9 </head>
10 <body>
11 <script>
12 async_test(function(test) {
13 assert_true(!!window.testRunner, 'This test requires the TestRunner.');
Peter Beverloo 2014/12/10 00:18:17 It might be nicer to make the testRunner "optional
Michael van Ouwerkerk 2014/12/10 15:13:06 Done.
14 var workerUrl = 'resources/empty_worker.js';
15 var workerScope = 'resources/scope/' + location.pathname;
16 service_worker_unregister_and_register(test, workerUrl, workerScope)
17 .then(function(serviceWorkerRegistration) {
18 testRunner.setPushMessagingPermission(location.origin, false);
19 return serviceWorkerRegistration.pushManager.hasPermission();
20 })
21 .then(function(permissionStatus) {
22 assert_equals(permissionStatus, 'denied');
23 return service_worker_unregister_and_done(test, workerScope);
24 })
25 .catch(unreached_rejection(test));
26 }, 'Push API: hasPermission fulfills with denied when permission is denied');
27 </script>
28 </body>
29 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698