blob: 07f16fdb930f544ca38c5fdcec42637670aedd32 [file] [log] [blame]
<!doctype html>
<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>
// 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 = 'instrumentation-service-worker.js';
testRunner.setPermission('notifications', 'granted', location.origin, location.origin);
getActiveServiceWorkerWithMessagePort(test, script, scope).then(function(info) {
// (1) Display a Web Notification with an image that 404s.
return info.registration.showNotification(scope, {
body: 'Hello, world!',
icon: '/resources/404image.php'
}).then(function() {
}, 'Displaying a notification with an image that 404s still resolves the promise.');