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>
This commit is contained in:
Luke Warlow
2026-02-20 13:00:06 +00:00
committed by GitHub
parent b6f714c73d
commit 853fcf4fda
27 changed files with 366 additions and 108 deletions

View File

@@ -12774,7 +12774,7 @@
"css": {
"animations": {
"animation-delay.html": [
"f54cf2b9bca93e82b177243b9d754e4ae3bf15fa",
"57f6ca6e435c4c5776749d5e93283bf22ea5d89b",
[
null,
{}
@@ -12790,35 +12790,35 @@
]
],
"animation-fill-mode.html": [
"ac3062879af9836768890d653f4b29b6165b6a45",
"618e19b2cc8c94ae9ccc447b65a8bef8ac5dd60c",
[
null,
{}
]
],
"basic-linear-width.html": [
"634b09dca5924b8bea58ac8532d9d46c20d8a0ad",
"e464c89e4d6dc51fde8b0538fc330b579eb51cf2",
[
null,
{}
]
],
"basic-transition.html": [
"c3461d3a5f9f1259296168742028db3bd4fc3668",
"00055c9d64416f4ed0c9650fc89244d586e23c18",
[
null,
{}
]
],
"faster-reversing-of-transitions.html": [
"e646a06405d3f32b37e94f797f7a99c6ca54254b",
"6df6d056ef9dc0934961147abc3d3538db287a56",
[
null,
{}
]
],
"mixed-units.html": [
"bb029a9fa80650c39e3f9524748e2b8893a476e1",
"c2d0cb1843d8299f8e41f943992bbb06e9d4305c",
[
null,
{}
@@ -12841,7 +12841,7 @@
]
],
"transition-raf.html": [
"aa3ed54e3e08a190f227c87165523306aed5a6bc",
"b681ad2c6f3f8e2f5c9af9eaa638dba1a6e8fc3d",
[
null,
{}
@@ -13031,6 +13031,43 @@
]
]
},
"incremental-layout": {
"layout-phases-display-list.html": [
"0f08ae12a4610987d304bdd2431ccde0bec192be",
[
null,
{}
]
],
"layout-phases-image-data.html": [
"720119806ea94ae3d8a89d29a4daba5c6ab8eba0",
[
null,
{}
]
],
"layout-phases-layout.html": [
"51a0239e9e3e1508581dee4d905b7565f4cba750",
[
null,
{}
]
],
"layout-phases-overflow.html": [
"eabcd289b9a5fed3ef3b2f57c2e9f3215e0cbd46",
[
null,
{}
]
],
"layout-phases-stacking-context.html": [
"a1ad8cbee5bd2f1ee140add0f30312517a6e7368",
[
null,
{}
]
]
},
"input-events": {
"collapsed-selection-input-text.html": [
"c80ddeff12b0ebc6568c03dabe848ac57e44737b",
@@ -14603,7 +14640,7 @@
]
],
"sigsegv.html": [
"5b1aadd83a2afd453e088aef72ad42ac7ad03d9f",
"51b9192c23e91d12befb3457a1fb19e59e96f803",
[
null,
{}