Files
servo/tests/html/panic.html
Luke Warlow 853fcf4fda script: Introduce ServoTestUtils and a forceLayout() function (#42714)
This introduces a new `ServoTestUtils` namespace with a `forceLayout()`
function. This `forceLayout()` function returns an object which
currently has an array of the phases ran by layout. Also moves
`panic()`, `crashHard()` and `advanceClock()` from `TestBinding` to this
new namespace.  `TestBinding` is meant to test the bindings generation,
but these are more generic helpers for Servo-only tests.

Testing: This change adds a series of Servo-only tests that verify the
behavior of the new `forceLayout()` function. Tests that rely on the
moved interfaces are updated and should continue to pass.

Signed-off-by: Luke Warlow <lwarlow@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2026-02-20 13:00:06 +00:00

17 lines
636 B
HTML

<!-- To exercise these tests, set the `dom.testbinding.enabled` to true.
It is expected that the browser will not abort due to failed JS engine assertions. -->
<!-- Straightforward test - invoking a panic from a toplevel script execution -->
<script>
ServoTestUtils.panic();
</script>
<!-- invoking a panic from an event handler which is invoked by native code -->
<!--<iframe src="data:,hi there" onload="ServoTestUtils.panic()"></iframe>-->
<!-- invoking a panic from an event handler which is invoked by script -->
<!--<div onclick="ServoTestUtils.panic()"></div>
<script>
document.querySelector('div').click();
</script>-->