Commit graph

4 commits

Author SHA1 Message Date
Aliaksandr Kalenik
ff4c99ec0a Meta+Tests: Substitute Ahem font path in import-wpt-test.py
(cherry picked from commit 3833049fc8680d4e6349511cf566f27a25225ada)
2024-11-21 22:16:48 -05:00
sideshowbarker
c4b4f293e9 Meta: Make import-wpt-test.py use html.parser, not BeautifulSoup
This change switches the Meta/import-wpt-test.py script to using the
standard html.parser module rather than BeautifulSoup.

Otherwise, without this change, when a contributor first tries to run
the script, if they don’t have BeautifulSoup installed, it will fail.

Note that this patch also includes an unrelated small change that
switches to using os.path.normpath — rather than Path.absolute() — to
“normalize” the destination names of the downloaded test files.

(cherry picked from commit 286511c4cf9dcd985882c9bbb2de42b01e7494a9)
2024-11-21 22:16:48 -05:00
sideshowbarker
c5b9ce19eb Meta: Make import-wpt-test.py resolve “..” parent refs in URLs/pathnames
This change makes the Meta/import-wpt-test.py script handle URLs such as
https://wpt.live//WebCryptoAPI/generateKey/../util/helpers.js and paths
containing, e.g., wpt-import/WebCryptoAPI/generateKey/../util/helpers.js
(that is, URLs and paths with “..” parent-directory references in them).

Otherwise, without this change, when the import-wpt-test.py script tries
a URL like https://wpt.live//WebCryptoAPI/generateKey/../util/helpers.js
which contains a “..” parent-directory reference, the script fails with
a “urllib.error.HTTPError: HTTP Error 404: Not Found” error message.

(cherry picked from commit cf7a1f6a5297f4b01a98a39a3d9da6dd4cbcf5d2)
2024-11-21 22:16:48 -05:00
stelar7
4181fe7453 Meta: Add a script to import WPT tests
(cherry picked from commit 5630a0d6b44c3599f8a70b07dc294080dcb50ae1)
2024-11-21 22:16:48 -05:00