mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 15:10:19 +00:00
Meta: Use headless-browser
by default when running tests with WPT.sh
This change removes the `--headless` option, which is now the default behavior and adds the `--show-window` option to force tests to run in a visible browser window.
This commit is contained in:
parent
3ecc843cff
commit
02268e9c60
Notes:
github-actions[bot]
2024-11-15 12:15:04 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/02268e9c60a Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2352
1 changed files with 13 additions and 7 deletions
20
Meta/WPT.sh
20
Meta/WPT.sh
|
@ -103,12 +103,12 @@ set_logging_flags()
|
||||||
WPT_ARGS+=( "${log_type}=${log_name}" )
|
WPT_ARGS+=( "${log_type}=${log_name}" )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
headless=1
|
||||||
ARG=$1
|
ARG=$1
|
||||||
while [[ "$ARG" =~ ^(--headless|(--log(-(raw|unittest|xunit|html|mach|tbpl|grouped|chromium|wptreport|wptscreenshot))?))$ ]]; do
|
while [[ "$ARG" =~ ^(--show-window|(--log(-(raw|unittest|xunit|html|mach|tbpl|grouped|chromium|wptreport|wptscreenshot))?))$ ]]; do
|
||||||
case "$ARG" in
|
case "$ARG" in
|
||||||
--headless)
|
--show-window)
|
||||||
LADYBIRD_BINARY="$(default_binary_path)/headless-browser"
|
headless=0
|
||||||
WPT_ARGS+=( "--webdriver-arg=--headless" )
|
|
||||||
;;
|
;;
|
||||||
--log)
|
--log)
|
||||||
set_logging_flags "--log-raw" "${2}"
|
set_logging_flags "--log-raw" "${2}"
|
||||||
|
@ -124,7 +124,13 @@ while [[ "$ARG" =~ ^(--headless|(--log(-(raw|unittest|xunit|html|mach|tbpl|group
|
||||||
ARG=$1
|
ARG=$1
|
||||||
done
|
done
|
||||||
|
|
||||||
WPT_ARGS+=( "--binary=${LADYBIRD_BINARY}" )
|
if [ $headless -eq 1 ]; then
|
||||||
|
WPT_ARGS+=( "--binary=${HEADLESS_BROWSER_BINARY}" )
|
||||||
|
WPT_ARGS+=( "--webdriver-arg=--headless" )
|
||||||
|
else
|
||||||
|
WPT_ARGS+=( "--binary=${LADYBIRD_BINARY}" )
|
||||||
|
fi
|
||||||
|
|
||||||
TEST_LIST=( "$@" )
|
TEST_LIST=( "$@" )
|
||||||
|
|
||||||
for i in "${!TEST_LIST[@]}"; do
|
for i in "${!TEST_LIST[@]}"; do
|
||||||
|
@ -173,8 +179,8 @@ execute_wpt() {
|
||||||
fi
|
fi
|
||||||
WPT_ARGS+=( "--webdriver-arg=--certificate=${certificate_path}" )
|
WPT_ARGS+=( "--webdriver-arg=--certificate=${certificate_path}" )
|
||||||
done
|
done
|
||||||
echo QT_QPA_PLATFORM="offscreen" LADYBIRD_GIT_VERSION="$(ladybird_git_hash)" ./wpt run "${WPT_ARGS[@]}" ladybird "${TEST_LIST[@]}"
|
echo LADYBIRD_GIT_VERSION="$(ladybird_git_hash)" ./wpt run "${WPT_ARGS[@]}" ladybird "${TEST_LIST[@]}"
|
||||||
QT_QPA_PLATFORM="offscreen" LADYBIRD_GIT_VERSION="$(ladybird_git_hash)" ./wpt run "${WPT_ARGS[@]}" ladybird "${TEST_LIST[@]}"
|
LADYBIRD_GIT_VERSION="$(ladybird_git_hash)" ./wpt run "${WPT_ARGS[@]}" ladybird "${TEST_LIST[@]}"
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue