mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +00:00
LibWeb: Run LibWeb layout tests using headless-browser
This commit is contained in:
parent
7090f74524
commit
127d2e2098
|
@ -10,16 +10,12 @@ if [[ -z "${LADYBIRD_BUILD_DIR}" ]] ; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "$(uname -s)" = "Darwin" ]] ; then
|
||||
LADYBIRD_BINARY="./ladybird.app/Contents/MacOS/ladybird"
|
||||
else
|
||||
LADYBIRD_BINARY="./ladybird"
|
||||
fi
|
||||
BROWSER_BINARY="./headless-browser"
|
||||
|
||||
for input_html_path in "${SCRIPT_DIR}"/input/*.html; do
|
||||
input_html_file="$(basename "${input_html_path}" .html)"
|
||||
|
||||
output_layout_dump=$(cd "${LADYBIRD_BUILD_DIR}"; "${LADYBIRD_BINARY}" -d "${input_html_path}")
|
||||
output_layout_dump=$(cd "${LADYBIRD_BUILD_DIR}"; "${BROWSER_BINARY}" -d "${input_html_path}")
|
||||
expected_layout_dump_path="${SCRIPT_DIR}/expected/${input_html_file}.txt"
|
||||
|
||||
if cmp <(echo "${output_layout_dump}") "${expected_layout_dump_path}"; then
|
||||
|
|
Loading…
Reference in a new issue