Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/ServiceWorkerGlobalScope/resources/error-worker-script.js |
| diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/ServiceWorkerGlobalScope/resources/error-worker-script.js b/third_party/WebKit/LayoutTests/http/tests/serviceworker/ServiceWorkerGlobalScope/resources/error-worker-script.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c093301054b568d85d9f2be736e582b692f6e3e1 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/ServiceWorkerGlobalScope/resources/error-worker-script.js |
| @@ -0,0 +1,12 @@ |
| +var source; |
| + |
| +self.addEventListener('message', function(e) { |
| + source = e.source; |
| + throw 'testError'; |
| +}); |
| + |
| +self.addEventListener('error', function(e) { |
| + source.postMessage({ source: "event listener", value: e.error }); |
|
nhiroki
2017/04/05 07:38:38
ditto(source)
yiyix
2017/04/05 09:02:55
Done.
|
| +}); |
| + |
| + |
|
shimazu
2017/04/05 07:23:22
Could you remove these extra newlines?
yiyix
2017/04/05 09:02:55
Done.
|