| Index: LayoutTests/http/tests/notifications/serviceworkerregistration-get-empty.html
|
| diff --git a/LayoutTests/http/tests/notifications/serviceworkerregistration-get-empty.html b/LayoutTests/http/tests/notifications/serviceworkerregistration-get-empty.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..6e389adae32105b1579d43ab9c854eb52ca3944d
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/notifications/serviceworkerregistration-get-empty.html
|
| @@ -0,0 +1,28 @@
|
| +<!doctype html>
|
| +<html>
|
| + <head>
|
| + <title>Notifications: ServiceWorkerRegistration.getNotifications() with no notifications.</title>
|
| + <script src="../resources/testharness.js"></script>
|
| + <script src="../resources/testharnessreport.js"></script>
|
| + <script src="../serviceworker/resources/test-helpers.js"></script>
|
| + <script src="resources/test-helpers.js"></script>
|
| + </head>
|
| + <body>
|
| + <script>
|
| + // Tests that the getNotifications() function when used in a document without
|
| + // notifications returns a promise that gets resolved with an empty array.
|
| + async_test(function(test) {
|
| + var scope = 'resources/scope/' + location.pathname,
|
| + script = 'resources/instrumentation-service-worker.js';
|
| +
|
| + getActiveServiceWorkerWithMessagePort(test, script, scope).then(function(workerInfo) {
|
| + return workerInfo.registration.getNotifications();
|
| + }).then(function(notifications) {
|
| + assert_array_equals(notifications, []);
|
| + test.done();
|
| + }).catch(unreached_rejection(test));
|
| +
|
| + }, 'ServiceWorkerRegistration.getNotifications() with no notifications.');
|
| + </script>
|
| + </body>
|
| +</html>
|
|
|