diff --git a/Documentation/Browser/Patterns.md b/Documentation/Browser/Patterns.md index 7ff1521102f..9e7640766c1 100644 --- a/Documentation/Browser/Patterns.md +++ b/Documentation/Browser/Patterns.md @@ -157,7 +157,7 @@ Running `Tests/LibWeb/add_libweb_test.py your-new-test-name` will create a new t a corresponding expectations file in `Tests/LibWeb/Text/expected/your-new-test-name.txt`. After you update/replace the generated boilerplate in your `your-new-test-name.html` test file with your actual test, -running `./Tests/LibWeb/rebaseline-libweb-test file:///opt/ladybird/Tests/LibWeb/Text/input/foobar.html` will +running `headless-browser --run-tests "${LADYBIRD_SOURCE_DIR}/Tests/LibWeb" --rebaseline -f Text/input/foobar.html` will regenerate the corresponding expectations file — to match the actual output from your updated test (where `/opt/ladybird` should be replaced with the absolute path your ladybird clone in your local environment). diff --git a/Tests/LibWeb/rebaseline-libweb-test b/Tests/LibWeb/rebaseline-libweb-test deleted file mode 100755 index 0761d256476..00000000000 --- a/Tests/LibWeb/rebaseline-libweb-test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -set +e - -t=$1 -if echo -n $t | grep ^file: ; then - t=$(echo -n $t | sed s@^file://@@) -fi - -if echo -n $t | grep Layout ; then - mode_flag="-d" -else - mode_flag="-T" -fi - -input_dir=$(dirname $t) -expected_dir=$(echo $input_dir | sed s/input/expected/) -test_name=$(basename $t .html) - -if [[ "$BUILD_PRESET" == "Sanitizer" ]]; then - build_dir=$LADYBIRD_SOURCE_DIR/Build/ladybird-sanitizers -elif [[ "$BUILD_PRESET" == "Debug" ]]; then - build_dir=$LADYBIRD_SOURCE_DIR/Build/ladybird-debug -else - build_dir=$LADYBIRD_SOURCE_DIR/Build/ladybird -fi - -cd "$build_dir" || { echo "Couldn’t cd to build directory" >&2 && exit 1; } - -if [[ -f ./bin/headless-browser ]]; then - ladybird_headless_binary=./bin/headless-browser -elif [[ -f ./bin/Ladybird.app/Contents/MacOS/headless-browser ]]; then - ladybird_headless_binary=./bin/Ladybird.app/Contents/MacOS/headless-browser -else - echo "ERR: Could not find headless-browser binary" >&2 - exit 1 -fi - -mkdir -p $expected_dir -$ladybird_headless_binary $mode_flag --force-fontconfig --layout-test-mode $input_dir/$test_name.html > $expected_dir/$test_name.txt