mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-24 16:40:21 +00:00
Tests: Allow wpt.live URLs for both “WPT.sh run” and “WPT.sh import”
This change allows you to give http[s]://wpt.live/ URLs to the WPT.sh script for both the “WPT.sh run” and “WPT.sh import” commands. That facilitates the use case where you’ve navigated to a wpt.live URL in a browser, and you want to just directly copy-paste the URL in order to either run the test in Ladybird, or import the test into the repo. Otherwise, without this change, when using WPT.sh, you’re limited to needing to specify either a WPT path fragment or filesystem pathname — which doesn’t allow for easy copy-paste directly from wpt.fyi.
This commit is contained in:
parent
b0e58054aa
commit
0a773b408a
Notes:
github-actions[bot]
2024-11-09 15:10:19 +00:00
Author: https://github.com/sideshowbarker Commit: https://github.com/LadybirdBrowser/ladybird/commit/0a773b408ac Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2203
1 changed files with 8 additions and 0 deletions
|
@ -131,6 +131,8 @@ for i in "${!TEST_LIST[@]}"; do
|
|||
item="${TEST_LIST[i]}"
|
||||
item="${item#"$WPT_SOURCE_DIR"/}"
|
||||
item="${item#*Tests/LibWeb/WPT/wpt/}"
|
||||
item="${item#http://wpt.live/}"
|
||||
item="${item#https://wpt.live/}"
|
||||
TEST_LIST[i]="$item"
|
||||
done
|
||||
|
||||
|
@ -193,6 +195,12 @@ serve_wpt()
|
|||
|
||||
import_wpt()
|
||||
{
|
||||
for i in "${!INPUT_PATHS[@]}"; do
|
||||
item="${INPUT_PATHS[i]}"
|
||||
item="${item#http://wpt.live/}"
|
||||
item="${item#https://wpt.live/}"
|
||||
INPUT_PATHS[i]="$item"
|
||||
done
|
||||
pushd "${LADYBIRD_SOURCE_DIR}" > /dev/null
|
||||
./Meta/ladybird.sh build headless-browser
|
||||
for path in "${INPUT_PATHS[@]}"; do
|
||||
|
|
Loading…
Reference in a new issue