mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
Add support for WPT test variants, which allow a single test file to be run multiple times with different URL query parameters. Tests declare variants using `<meta name="variant" content="?param=value">` tags. When test-web encounters a test with variants, it expands that test into multiple runs, each with its own expectation file using the naming convention `testname@variant.txt` (e.g., `test@run_type=uri.txt`). Implementation details: - WebContent observes variant meta tags and communicates them to the test runner via a new `did_receive_test_variant_metadata` IPC call - test-web dynamically expands tests with variants during execution, waking idle views after each test completion to pick up new work - Use index-based test tracking to avoid dangling references when the test vector grows during variant expansion - Introduce TestRunContext to group test run state, and store a static pointer to it for signal handler access This enables proper testing of WPT tests that use variants, such as the html5lib parsing tests (which test uri, write, and write_single modes) and the editing/bold tests (which split across multiple ranges).