Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / storage / indexeddb / transaction-complete-workers.html
blob72042de0a6e7688f02ffd1ebcd4b16fe1b150f3d
1 <html>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 <script src="resources/shared.js"></script>
5 </head>
6 <body>
7 <script>
9 worker = startWorker('resources/transaction-complete-workers.js');
11 // FIXME: It should be possible for the worker to set self.onerror to catch the event
12 // and call event.preventDefault(), but in the current Worker implementation the raw
13 // exception is seen by the event handler in the worker, not an ErrorEvent object.
15 var orig_onerror = worker.onerror;
16 worker.onerror = function (event) {
17 if (event.message === "Uncaught Error: ignore this" || event.message === "Error: ignore this") {
18 debug("Got expected error from worker, ignoring");
19 evalAndLog("event.preventDefault()");
20 } else if (orig_onerror) {
21 orig_onerror(event);
26 </script>
27 </body>
28 </html>