diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
commit | 8dd16259287f58f9273002717ec4d27e97127719 (patch) | |
tree | 3863e62a53829a84037444beab3abd4ed9dfc7d0 /testing/web-platform/tests/tools/manifest | |
parent | Releasing progress-linux version 126.0.1-1~progress7.99u1. (diff) | |
download | firefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz firefox-8dd16259287f58f9273002717ec4d27e97127719.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/tools/manifest')
-rw-r--r-- | testing/web-platform/tests/tools/manifest/item.py | 2 | ||||
-rw-r--r-- | testing/web-platform/tests/tools/manifest/requirements.txt | 2 | ||||
-rw-r--r-- | testing/web-platform/tests/tools/manifest/sourcefile.py | 20 |
3 files changed, 16 insertions, 8 deletions
diff --git a/testing/web-platform/tests/tools/manifest/item.py b/testing/web-platform/tests/tools/manifest/item.py index 86f7bd6020..e25f7ca2c2 100644 --- a/testing/web-platform/tests/tools/manifest/item.py +++ b/testing/web-platform/tests/tools/manifest/item.py @@ -279,7 +279,7 @@ class PrintRefTest(RefTest): @property def page_ranges(self) -> PageRanges: - return self._extras.get("page_ranges", {}) + return cast(PageRanges, self._extras.get("page_ranges", {})) def to_json(self): # type: ignore rv = super().to_json() diff --git a/testing/web-platform/tests/tools/manifest/requirements.txt b/testing/web-platform/tests/tools/manifest/requirements.txt index d7c173723e..70ad0df0e9 100644 --- a/testing/web-platform/tests/tools/manifest/requirements.txt +++ b/testing/web-platform/tests/tools/manifest/requirements.txt @@ -1 +1 @@ -zstandard==0.21.0 +zstandard==0.22.0 diff --git a/testing/web-platform/tests/tools/manifest/sourcefile.py b/testing/web-platform/tests/tools/manifest/sourcefile.py index 71eab54bea..3563fb9e5e 100644 --- a/testing/web-platform/tests/tools/manifest/sourcefile.py +++ b/testing/web-platform/tests/tools/manifest/sourcefile.py @@ -4,8 +4,8 @@ import os from collections import deque from fnmatch import fnmatch from io import BytesIO -from typing import (Any, BinaryIO, Callable, Deque, Dict, Iterable, List, Optional, Pattern, - Set, Text, Tuple, Union, cast) +from typing import (Any, BinaryIO, Callable, Deque, Dict, Iterable, List, + Optional, Pattern, Set, Text, Tuple, TypedDict, Union, cast) from urllib.parse import urljoin try: @@ -68,7 +68,13 @@ def read_script_metadata(f: BinaryIO, regexp: Pattern[bytes]) -> Iterable[Tuple[ yield (m.groups()[0].decode("utf8"), m.groups()[1].decode("utf8")) -_any_variants: Dict[Text, Dict[Text, Any]] = { +class VariantData(TypedDict, total=False): + suffix: str + force_https: bool + longhand: Set[str] + + +_any_variants: Dict[Text, VariantData] = { "window": {"suffix": ".any.html"}, "window-module": {}, "serviceworker": {"force_https": True}, @@ -205,9 +211,11 @@ class SourceFile: type_flag = None if "-" in name: - type_flag = name.rsplit("-", 1)[1].split(".")[0] - - meta_flags = name.split(".")[1:] + type_meta = name.rsplit("-", 1)[1].split(".") + type_flag = type_meta[0] + meta_flags = type_meta[1:] + else: + meta_flags = name.split(".")[1:] self.tests_root: Text = tests_root self.rel_path: Text = rel_path |