Commit graph

7 commits

Author SHA1 Message Date
Sam Atkins
f2407cd511 Meta: Support importing WPT ref tests that use an absolute path
For example, a few ref tests have a match like this:
```
<link rel="match"
      href="/css/reference/ref-filled-green-100px-square-only.html">
```

Previously we'd interpret this as `http://css/reference/...` which made
the test runner sad.
2024-11-06 20:03:38 +01:00
Sam Atkins
8673dd4e6e Meta: Include stylesheets and stylesheet-includes in WPT imports
Because of this we no longer have to handle ahem.css in a special way.

This should find:
- <link rel=stylesheet>
- CSS `@import`s
- Any resources linked from a stylesheet with `url()`

There's a good chance there are other resources we'll want to copy too,
but CSS was a big hole.
2024-11-06 20:03:38 +01:00
Sam Atkins
7a5b38d577 Meta: Support importing WPT reference tests 2024-11-05 17:58:16 +00:00
Aliaksandr Kalenik
3833049fc8 Meta+Tests: Substitute Ahem font path in import-wpt-test.py 2024-11-05 17:44:08 +01:00
sideshowbarker
286511c4cf 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.
2024-11-01 12:27:24 +01:00
sideshowbarker
cf7a1f6a52 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.
2024-10-31 07:04:18 +00:00
stelar7
5630a0d6b4 Meta: Add a script to import WPT tests 2024-10-30 17:29:03 +01:00