summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/tools/webdriver
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /testing/web-platform/tests/tools/webdriver
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/tools/webdriver')
-rw-r--r--testing/web-platform/tests/tools/webdriver/webdriver/bidi/client.py2
-rw-r--r--testing/web-platform/tests/tools/webdriver/webdriver/bidi/error.py4
-rw-r--r--testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/browsing_context.py8
-rw-r--r--testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/input.py11
-rw-r--r--testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/network.py5
-rw-r--r--testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/script.py13
-rw-r--r--testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/session.py4
-rw-r--r--testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/storage.py14
8 files changed, 44 insertions, 17 deletions
diff --git a/testing/web-platform/tests/tools/webdriver/webdriver/bidi/client.py b/testing/web-platform/tests/tools/webdriver/webdriver/bidi/client.py
index 73bba55791..045bc048c4 100644
--- a/testing/web-platform/tests/tools/webdriver/webdriver/bidi/client.py
+++ b/testing/web-platform/tests/tools/webdriver/webdriver/bidi/client.py
@@ -205,7 +205,7 @@ class BidiSession:
if not listeners:
listeners = self.event_listeners.get(None, [])
for listener in listeners:
- await listener(data["method"], data["params"])
+ asyncio.create_task(listener(data["method"], data["params"]))
else:
raise ValueError(f"Unexpected message: {data!r}")
diff --git a/testing/web-platform/tests/tools/webdriver/webdriver/bidi/error.py b/testing/web-platform/tests/tools/webdriver/webdriver/bidi/error.py
index 42361ca90b..bb3bd4d7fc 100644
--- a/testing/web-platform/tests/tools/webdriver/webdriver/bidi/error.py
+++ b/testing/web-platform/tests/tools/webdriver/webdriver/bidi/error.py
@@ -95,6 +95,10 @@ class UnableToSetCookieException(BidiException):
error_code = "unable to set cookie"
+class UnableToSetFileInputException(BidiException):
+ error_code = "unable to set file input"
+
+
class UnderspecifiedStoragePartitionException(BidiException):
error_code = "underspecified storage partition"
diff --git a/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/browsing_context.py b/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/browsing_context.py
index cdb5e11816..f2d2fad858 100644
--- a/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/browsing_context.py
+++ b/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/browsing_context.py
@@ -3,7 +3,7 @@ from enum import Enum
from typing import Any, Dict, List, Mapping, MutableMapping, Optional, Union
from ._module import BidiModule, command
-from .script import OwnershipModel, SerializationOptions
+from .script import SerializationOptions
from ..undefined import UNDEFINED, Undefined
@@ -140,17 +140,11 @@ class BrowsingContext(BidiModule):
context: str,
locator: Mapping[str, Any],
max_node_count: Optional[int] = None,
- ownership: Optional[OwnershipModel] = None,
- sandbox: Optional[str] = None,
serialization_options: Optional[SerializationOptions] = None,
start_nodes: Optional[List[Mapping[str, Any]]] = None) -> Mapping[str, Any]:
params: MutableMapping[str, Any] = {"context": context, "locator": locator}
if max_node_count is not None:
params["maxNodeCount"] = max_node_count
- if ownership is not None:
- params["ownership"] = ownership
- if sandbox is not None:
- params["sandbox"] = sandbox
if serialization_options is not None:
params["serializationOptions"] = serialization_options
if start_nodes is not None:
diff --git a/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/input.py b/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/input.py
index b2703843b1..ee4f8136e9 100644
--- a/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/input.py
+++ b/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/input.py
@@ -410,6 +410,17 @@ class Input(BidiModule):
params: MutableMapping[str, Any] = {"context": context}
return params
+ @command
+ def set_files(
+ self, context: str, element: Any, files: List[str]
+ ) -> Mapping[str, Any]:
+ params: MutableMapping[str, Any] = {
+ "context": context,
+ "element": element,
+ "files": files,
+ }
+ return params
+
def get_element_origin(element: Any) -> Mapping[str, Any]:
return {"type": "element", "element": {"sharedId": element["sharedId"]}}
diff --git a/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/network.py b/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/network.py
index 8bc51334d2..4523f67e9c 100644
--- a/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/network.py
+++ b/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/network.py
@@ -106,7 +106,7 @@ URLPattern = Union[URLPatternPattern, URLPatternString]
class Network(BidiModule):
@command
def add_intercept(
- self, phases: List[str], url_patterns: Optional[List[URLPattern]] = None
+ self, phases: List[str], url_patterns: Optional[List[URLPattern]] = None, contexts: Optional[List[str]] = None
) -> Mapping[str, Any]:
params: MutableMapping[str, Any] = {
"phases": phases,
@@ -115,6 +115,9 @@ class Network(BidiModule):
if url_patterns is not None:
params["urlPatterns"] = url_patterns
+ if contexts is not None:
+ params["contexts"] = contexts
+
return params
@add_intercept.result
diff --git a/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/script.py b/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/script.py
index 737426a5d5..01855766d8 100644
--- a/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/script.py
+++ b/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/script.py
@@ -3,6 +3,7 @@ from typing import Any, Dict, List, Mapping, MutableMapping, Optional, Union
from ..error import UnknownErrorException
from ._module import BidiModule, command
+from ..undefined import UNDEFINED, Undefined
class ScriptEvaluateResultException(Exception):
@@ -78,15 +79,15 @@ Target = Union[RealmTarget, ContextTarget]
class SerializationOptions(Dict[str, Any]):
def __init__(
self,
- max_dom_depth: Optional[int] = None,
- max_object_depth: Optional[int] = None,
- include_shadow_tree: Optional[str] = None
+ max_dom_depth: Union[Optional[int], Undefined] = UNDEFINED,
+ max_object_depth: Union[Optional[int], Undefined] = UNDEFINED,
+ include_shadow_tree: Union[Optional[str], Undefined] = UNDEFINED
):
- if max_dom_depth is not None:
+ if max_dom_depth is not UNDEFINED:
self["maxDomDepth"] = max_dom_depth
- if max_object_depth is not None:
+ if max_object_depth is not UNDEFINED:
self["maxObjectDepth"] = max_object_depth
- if include_shadow_tree is not None:
+ if include_shadow_tree is not UNDEFINED and include_shadow_tree is not None:
self["includeShadowTree"] = include_shadow_tree
diff --git a/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/session.py b/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/session.py
index fe1c038510..725aab1bec 100644
--- a/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/session.py
+++ b/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/session.py
@@ -40,9 +40,9 @@ class Session(BidiModule):
@command
def unsubscribe(self,
- events: Optional[List[str]] = None,
+ events: List[str],
contexts: Optional[List[str]] = None) -> Mapping[str, Any]:
- params: MutableMapping[str, Any] = {"events": events if events is not None else []}
+ params: MutableMapping[str, Any] = {"events": events}
if contexts is not None:
params["contexts"] = contexts
return params
diff --git a/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/storage.py b/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/storage.py
index 882306ea72..14e8fa9434 100644
--- a/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/storage.py
+++ b/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/storage.py
@@ -95,6 +95,20 @@ class Storage(BidiModule):
return params
@command
+ def delete_cookies(
+ self,
+ filter: Optional[CookieFilter] = None,
+ partition: Optional[PartitionDescriptor] = None,
+ ) -> Mapping[str, Any]:
+ params: MutableMapping[str, Any] = {}
+
+ if filter is not None:
+ params["filter"] = filter
+ if partition is not None:
+ params["partition"] = partition
+ return params
+
+ @command
def set_cookie(
self,
cookie: PartialCookie,