blob: 04eb0d03470708dfa2e4525211edbd9f785ab56d [file] [log] [blame]
<!-- webkit-test-runner [ useEphemeralSession=true ] -->
<html>
<head>
<script src="../../resources/js-test.js"></script>
<script src="resources/shared.js"></script>
</head>
<body>
<script>
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>