Tests: Don't display imported WPT test output if browser is headless

Previously, imported WPT tests didn't display any output if the
internals object was exposed. This change adds the condition that the
browser must also be running headlessly for test output to not be
displayed.
This commit is contained in:
Tim Ledbetter 2024-12-09 21:58:16 +00:00 committed by Tim Flynn
parent a44b18236c
commit ae53059816
Notes: github-actions[bot] 2024-12-10 18:32:45 +00:00

View file

@ -9,7 +9,7 @@
// default timeout is 10 seconds, test can override if needed
var settings = {
// Assume we are running tests if the internals object is exposed.
output:!window.hasOwnProperty("internals"),
output: !(window.internals && window.internals.headless),
harness_timeout:{
"normal":150000, // NOTE: Overridden for Ladybird due to slow GCC CI
"long":300000 // NOTE: Overridden for Ladybird due to slow GCC CI
@ -4549,7 +4549,7 @@
AssertionError.prototype = Object.create(Error.prototype);
const get_stack = function() {
if (window.internals) {
if (window.internals && window.internals.headless) {
return "(Stack traces disabled in Ladybird test mode)";
}