diff --git a/testing/web-platform/meta/MANIFEST.json b/testing/web-platform/meta/MANIFEST.json index fc5d4a2e52c3..d314d44e1a3a 100644 --- a/testing/web-platform/meta/MANIFEST.json +++ b/testing/web-platform/meta/MANIFEST.json @@ -308064,6 +308064,11 @@ {} ] ], + "webdriver/tests/sessions/new_session/support/create.py": [ + [ + {} + ] + ], "webdriver/tests/state/__init__.py": [ [ {} @@ -407267,9 +407272,17 @@ {} ] ], - "webdriver/tests/sessions/new_session/create.py": [ + "webdriver/tests/sessions/new_session/create_alwaysMatch.py": [ [ - "/webdriver/tests/sessions/new_session/create.py", + "/webdriver/tests/sessions/new_session/create_alwaysMatch.py", + { + "timeout": "long" + } + ] + ], + "webdriver/tests/sessions/new_session/create_firstMatch.py": [ + [ + "/webdriver/tests/sessions/new_session/create_firstMatch.py", { "timeout": "long" } @@ -628498,8 +628511,12 @@ "d2df38e506cb9a3e501f03fe03e2a31af42d6f04", "support" ], - "webdriver/tests/sessions/new_session/create.py": [ - "f47ffcbaf22af9f445e4202ebeaa03bb9415fbc9", + "webdriver/tests/sessions/new_session/create_alwaysMatch.py": [ + "e4dd4fe4ab30d71e9fe383daf2ca00582615ec35", + "wdspec" + ], + "webdriver/tests/sessions/new_session/create_firstMatch.py": [ + "6fd2671870cd3451aab6f81ea19bd516a6c82bc9", "wdspec" ], "webdriver/tests/sessions/new_session/default_values.py": [ @@ -628518,6 +628535,10 @@ "3eca8e1d571b0c94b2a08fccfbe8cb9f1b1ba6d5", "wdspec" ], + "webdriver/tests/sessions/new_session/support/create.py": [ + "440d88462cc418e4d5e1df6f73074d3a722bd2fd", + "support" + ], "webdriver/tests/set_window_rect.py": [ "e84559c2ee94009fe808c3008c58e6e4b9ca27aa", "wdspec" diff --git a/testing/web-platform/tests/webdriver/tests/sessions/new_session/create.py b/testing/web-platform/tests/webdriver/tests/sessions/new_session/create.py deleted file mode 100644 index 5766dbda8fd6..000000000000 --- a/testing/web-platform/tests/webdriver/tests/sessions/new_session/create.py +++ /dev/null @@ -1,27 +0,0 @@ -#META: timeout=long - -import pytest - -from conftest import product, flatten - - -# Note that we can only test things here all implementations must support -valid_data = [ - ("acceptInsecureCerts", [False, None]), - ("browserName", [None]), - ("browserVersion", [None]), - ("platformName", [None]), - ("pageLoadStrategy", ["none", "eager", "normal", None]), - ("proxy", [None]), - ("unhandledPromptBehavior", ["dismiss", "accept", None]), - ("test:extension", [True, "abc", 123, [], {"key": "value"}, None]), -] - - -@pytest.mark.parametrize("body", [lambda key, value: {"alwaysMatch": {key: value}}, - lambda key, value: {"firstMatch": [{key: value}]}]) -@pytest.mark.parametrize("key,value", flatten(product(*item) for item in valid_data)) -def test_valid(new_session, body, key, value): - resp = new_session({"capabilities": body(key, value)}) - -# Continued in create-1.py to avoid timeouts diff --git a/testing/web-platform/tests/webdriver/tests/sessions/new_session/create_alwaysMatch.py b/testing/web-platform/tests/webdriver/tests/sessions/new_session/create_alwaysMatch.py new file mode 100644 index 000000000000..4a91c60d3609 --- /dev/null +++ b/testing/web-platform/tests/webdriver/tests/sessions/new_session/create_alwaysMatch.py @@ -0,0 +1,13 @@ +#META: timeout=long + +import pytest + +from conftest import product, flatten + +from .support.create import valid_data + + +@pytest.mark.parametrize("key,value", flatten(product(*item) for item in valid_data)) +def test_valid(new_session, key, value): + resp = new_session({"capabilities": {"alwaysMatch": {key: value}}}) + diff --git a/testing/web-platform/tests/webdriver/tests/sessions/new_session/create_firstMatch.py b/testing/web-platform/tests/webdriver/tests/sessions/new_session/create_firstMatch.py new file mode 100644 index 000000000000..ab983e769a4e --- /dev/null +++ b/testing/web-platform/tests/webdriver/tests/sessions/new_session/create_firstMatch.py @@ -0,0 +1,12 @@ +#META: timeout=long + +import pytest + +from conftest import product, flatten + +from .support.create import valid_data + + +@pytest.mark.parametrize("key,value", flatten(product(*item) for item in valid_data)) +def test_valid(new_session, key, value): + resp = new_session({"capabilities": {"firstMatch": [{key: value}]}}) diff --git a/testing/web-platform/tests/webdriver/tests/sessions/new_session/support/create.py b/testing/web-platform/tests/webdriver/tests/sessions/new_session/support/create.py new file mode 100644 index 000000000000..75ac3e8dc41b --- /dev/null +++ b/testing/web-platform/tests/webdriver/tests/sessions/new_session/support/create.py @@ -0,0 +1,11 @@ +# Note that we can only test things here all implementations must support +valid_data = [ + ("acceptInsecureCerts", [False, None]), + ("browserName", [None]), + ("browserVersion", [None]), + ("platformName", [None]), + ("pageLoadStrategy", ["none", "eager", "normal", None]), + ("proxy", [None]), + ("unhandledPromptBehavior", ["dismiss", "accept", None]), + ("test:extension", [True, "abc", 123, [], {"key": "value"}, None]), +]