| Index: LayoutTests/http/tests/push_messaging/permission-state-exception-in-document.html
|
| diff --git a/LayoutTests/http/tests/push_messaging/permission-state-prompt-in-document.html b/LayoutTests/http/tests/push_messaging/permission-state-exception-in-document.html
|
| similarity index 59%
|
| copy from LayoutTests/http/tests/push_messaging/permission-state-prompt-in-document.html
|
| copy to LayoutTests/http/tests/push_messaging/permission-state-exception-in-document.html
|
| index 77dd09b03b8cd85634fa05ea3dc009d9aeacc02e..2daa10d1ccea8539855f6f3d486b10edf9a8a190 100644
|
| --- a/LayoutTests/http/tests/push_messaging/permission-state-prompt-in-document.html
|
| +++ b/LayoutTests/http/tests/push_messaging/permission-state-exception-in-document.html
|
| @@ -1,7 +1,7 @@
|
| <!DOCTYPE html>
|
| <html>
|
| <head>
|
| -<title>Push API: permissionState resolves with prompt when no permission is set</title>
|
| +<title>Push API: permissionState fails with NotSupportedError if userVisibleOnly is not used</title>
|
| <link rel="manifest" href="resources/push_manifest.json">
|
| <script src="../resources/testharness.js"></script>
|
| <script src="../resources/testharnessreport.js"></script>
|
| @@ -21,11 +21,14 @@ async_test(function(test) {
|
| return serviceWorkerRegistration.pushManager.permissionState();
|
| })
|
| .then(function(permissionStatus) {
|
| - assert_equals(permissionStatus, 'prompt');
|
| - return service_worker_unregister_and_done(test, workerScope);
|
| - })
|
| - .catch(unreached_rejection(test));
|
| -}, 'Push API: permissionState() resolves with prompt when permission is not set');
|
| + assert_unreached('permissionStatus should have failed with a NotSupported exception');
|
| + }, function(error) {
|
| + assert_equals(error.name, 'NotSupportedError');
|
| + assert_equals(error.message,
|
| + 'Chrome does not support push subscriptions that do not enable the userVisibleOnly option.');
|
| + test.done();
|
| + }).catch(unreached_rejection(test));
|
| +}, 'Push API: permissionState fails with NotSupportedError if userVisibleOnly is not used');
|
| </script>
|
| </body>
|
| </html>
|
|
|