Chromium Code Reviews| Index: LayoutTests/http/tests/notifications/serviceworkerregistration-document-image-404.html |
| diff --git a/LayoutTests/http/tests/notifications/serviceworkerregistration-document-image-404.html b/LayoutTests/http/tests/notifications/serviceworkerregistration-document-image-404.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4456ded62338b4eba56f0a6c5e8e0940dc73cdf5 |
| --- /dev/null |
| +++ b/LayoutTests/http/tests/notifications/serviceworkerregistration-document-image-404.html |
| @@ -0,0 +1,34 @@ |
| +<!doctype html> |
| +<html> |
| + <head> |
| + <title>Notifications: Showing a notification with an image that 404s.</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 creates a 404 response |
| + // works properly, and does not block the actual display of it. |
| + |
| + 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 404s. |
| + assert_inherits(info.registration, 'showNotification', 'showNotification() must be exposed.'); |
|
mlamouri (slow - plz ping)
2015/02/18 20:38:20
Do you need to test that for every new test?
Peter Beverloo
2015/02/18 20:48:23
Removed.
|
| + return info.registration.showNotification(scope, { |
| + body: 'Hello, world!', |
| + icon: '/resources/404image.php' |
| + }); |
| + }).then(function() { |
| + test.done(); |
| + }).catch(unreached_rejection(test)); |
| + |
| + }, 'Displaying a notification with an image that 404s still resolves the promise.'); |
| + </script> |
| + </body> |
| +</html> |