mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 07:41:01 +00:00
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:
parent
a44b18236c
commit
ae53059816
Notes:
github-actions[bot]
2024-12-10 18:32:45 +00:00
Author: https://github.com/tcl3
Commit: ae53059816
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2858
Reviewed-by: https://github.com/trflynn89
1 changed files with 2 additions and 2 deletions
|
@ -9,7 +9,7 @@
|
||||||
// default timeout is 10 seconds, test can override if needed
|
// default timeout is 10 seconds, test can override if needed
|
||||||
var settings = {
|
var settings = {
|
||||||
// Assume we are running tests if the internals object is exposed.
|
// Assume we are running tests if the internals object is exposed.
|
||||||
output:!window.hasOwnProperty("internals"),
|
output: !(window.internals && window.internals.headless),
|
||||||
harness_timeout:{
|
harness_timeout:{
|
||||||
"normal":150000, // NOTE: Overridden for Ladybird due to slow GCC CI
|
"normal":150000, // NOTE: Overridden for Ladybird due to slow GCC CI
|
||||||
"long":300000 // 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);
|
AssertionError.prototype = Object.create(Error.prototype);
|
||||||
|
|
||||||
const get_stack = function() {
|
const get_stack = function() {
|
||||||
if (window.internals) {
|
if (window.internals && window.internals.headless) {
|
||||||
return "(Stack traces disabled in Ladybird test mode)";
|
return "(Stack traces disabled in Ladybird test mode)";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue