diff options
Diffstat (limited to 'testing/web-platform/tests/service-workers/service-worker/resources/onactivate-throw-error-worker.js')
-rw-r--r-- | testing/web-platform/tests/service-workers/service-worker/resources/onactivate-throw-error-worker.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/testing/web-platform/tests/service-workers/service-worker/resources/onactivate-throw-error-worker.js b/testing/web-platform/tests/service-workers/service-worker/resources/onactivate-throw-error-worker.js new file mode 100644 index 0000000000..1e88ac5c4e --- /dev/null +++ b/testing/web-platform/tests/service-workers/service-worker/resources/onactivate-throw-error-worker.js @@ -0,0 +1,7 @@ +// Ensure we can handle multiple activate handlers. One handler throwing an +// error should cause the event dispatch to be treated as having unhandled +// errors. +self.addEventListener('activate', function(event) {}); +self.addEventListener('activate', function(event) {}); +self.addEventListener('activate', function(event) { throw new Error(); }); +self.addEventListener('activate', function(event) {}); |