blob: 8e8361b67dbd4bbdb897fd70f544a1cd40157c08 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script>
window.isOnErrorTest = true;
</script>
<script src="../../resources/js-test.js"></script>
<script src="resources/onerror-test.js"></script>
</head>
<body>
<!-- This script's body will be used to build a Blob URL to use as a Worker. -->
<script id="workerCode" type="text/plain">
onerror = function(message, url, lineno, colno, error) {
bar.foo = 0;
return false;
}
foo.bar = 0;
</script>
<script>
description("This tests that unhandled exceptions in a worker's onerror handler trigger 'worker.onerror'.");
checkErrorEventInHandler([
// foo.bar = 0 triggers an error that isn't handled.
{
message: "Uncaught ReferenceError: foo is not defined",
filename: "[blob: URL]",
lineno: 7,
colno: 9,
},
// the error handler triggers an error
{
message: "Uncaught ReferenceError: bar is not defined",
filename: "[blob: URL]",
lineno: 3,
colno: 13,
}]);
</script>
</body>
</html>