mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
LibWeb: Add a feature to LibWeb tests to fail on unhandled exceptions
Previously, if there was an unhandled exception in an async test, it might fail to call done() and timeout. Now we have a default "error" handler to catch unhandled exceptions and fail the test. A few tests want to actually test the behavior of window.onerror, so they need an escape hatch.
This commit is contained in:
committed by
Andreas Kling
parent
1fa948f114
commit
8edaec79de
Notes:
github-actions[bot]
2024-10-05 07:19:21 +00:00
Author: https://github.com/ADKaster Commit: https://github.com/LadybirdBrowser/ladybird/commit/8edaec79dea Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1632
@@ -1,6 +1,8 @@
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
removeTestErrorHandler()
|
||||
|
||||
window.onerror = (message, filename, lineno, colno, error) => {
|
||||
println(`message = ${message}`);
|
||||
println(`lineno = ${lineno}`);
|
||||
|
||||
Reference in New Issue
Block a user