blob: 1f20b3ea8d74377168638a72e7139556f0e62059 [file] [log] [blame]
<html>
<head>
<script src="../../resources/js-test.js"></script>
<script src="resources/shared.js"></script>
</head>
<body>
<script>
if (window.internals)
window.internals.settings.setIndexedDBWorkersEnabled(true);
worker = startWorker('resources/transaction-complete-workers.js');
// FIXME: It should be possible for the worker to set self.onerror to catch the event
// and call event.preventDefault(), but in the current Worker implementation the raw
// exception is seen by the event handler in the worker, not an ErrorEvent object.
var orig_onerror = worker.onerror;
worker.onerror = function (event) {
if (event.message === "Uncaught Error: ignore this" || event.message === "Error: ignore this") {
debug("Got expected error from worker, ignoring");
evalAndLog("event.preventDefault()");
} else if (orig_onerror) {
orig_onerror(event);
}
};
</script>
</body>
</html>