| Index: LayoutTests/http/tests/notifications/serviceworkerregistration-document-image-redirect.html
|
| diff --git a/LayoutTests/http/tests/notifications/serviceworkerregistration-document-image-redirect.html b/LayoutTests/http/tests/notifications/serviceworkerregistration-document-image-redirect.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c1701003ce2906184dae94e0397884f912cf7022
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/notifications/serviceworkerregistration-document-image-redirect.html
|
| @@ -0,0 +1,33 @@
|
| +<!doctype html>
|
| +<html>
|
| + <head>
|
| + <title>Notifications: Showing a notification with an image having a redirect.</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 showing a notification with an image that redirect to another
|
| + // location will still resolve the showNotification() promise.
|
| +
|
| + async_test(function(test) {
|
| + var scope = 'resources/scope/' + location.pathname,
|
| + script = 'resources/instrumentation-service-worker.js';
|
| +
|
| + testRunner.grantWebNotificationPermission(location.origin, true);
|
| + getActiveServiceWorkerWithMessagePort(test, script, scope).then(function(info) {
|
| + // (1) Display a Web Notification with an image that redirects.
|
| + return info.registration.showNotification(scope, {
|
| + body: 'Hello, world!',
|
| + icon: '/resources/redirect.php?url=square100.png&refresh=0'
|
| + });
|
| + }).then(function() {
|
| + test.done();
|
| + }).catch(unreached_rejection(test));
|
| +
|
| + }, 'Displaying a notification with an image that redirects still resolves the promise.');
|
| + </script>
|
| + </body>
|
| +</html>
|
|
|