diff --git a/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini b/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini index 76b398963ae..dd4ffcf4345 100644 --- a/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini +++ b/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini @@ -1,5 +1,4 @@ [url-in-tags-revoke.window.html] - expected: TIMEOUT [Fetching a blob URL immediately before revoking it works in an iframe.] expected: FAIL @@ -15,6 +14,3 @@ [Opening a blob URL in a new window by clicking an tag works immediately before revoking the URL.] expected: FAIL - [Fetching a blob URL immediately before revoking it works in + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-display/display-inline-dynamic-001-ref.html b/tests/wpt/web-platform-tests/css/css-display/display-inline-dynamic-001-ref.html new file mode 100644 index 00000000000..8b5f5015f9e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-display/display-inline-dynamic-001-ref.html @@ -0,0 +1,4 @@ + + +

Test passes if PASS is displayed in green below.

+
PASS
diff --git a/tests/wpt/web-platform-tests/css/css-display/display-inline-dynamic-001.html b/tests/wpt/web-platform-tests/css/css-display/display-inline-dynamic-001.html new file mode 100644 index 00000000000..7df697f940d --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-display/display-inline-dynamic-001.html @@ -0,0 +1,10 @@ + + + + +

Test passes if PASS is displayed in green below.

+
PS
+ diff --git a/tests/wpt/web-platform-tests/css/css-shadow-parts/interaction-with-tree-abiding.html b/tests/wpt/web-platform-tests/css/css-shadow-parts/interaction-with-tree-abiding.html new file mode 100644 index 00000000000..c11da7d12de --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-shadow-parts/interaction-with-tree-abiding.html @@ -0,0 +1,56 @@ + + + + CSS Shadow Parts - Interaction with tree-abiding + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-event-manual.html b/tests/wpt/web-platform-tests/html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-event-manual.html new file mode 100644 index 00000000000..73a3ff667ea --- /dev/null +++ b/tests/wpt/web-platform-tests/html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-event-manual.html @@ -0,0 +1,34 @@ + + +HTML Test: tabindex - focus, click + + + + + + +

Test steps

+

Focus on the button below by "Tab" key, then press "Enter" key

+ +

+ + diff --git a/tests/wpt/web-platform-tests/kv-storage/META.yml b/tests/wpt/web-platform-tests/kv-storage/META.yml new file mode 100644 index 00000000000..bf4a1e6e8b4 --- /dev/null +++ b/tests/wpt/web-platform-tests/kv-storage/META.yml @@ -0,0 +1,3 @@ +spec: https://wicg.github.io/kv-storage/ +suggested_reviewers: + - domenic diff --git a/tests/wpt/web-platform-tests/async-local-storage/api-surface.tentative.https.html b/tests/wpt/web-platform-tests/kv-storage/api-surface.https.html similarity index 92% rename from tests/wpt/web-platform-tests/async-local-storage/api-surface.tentative.https.html rename to tests/wpt/web-platform-tests/kv-storage/api-surface.https.html index 927871a8961..65452f55be0 100644 --- a/tests/wpt/web-platform-tests/async-local-storage/api-surface.tentative.https.html +++ b/tests/wpt/web-platform-tests/kv-storage/api-surface.https.html @@ -1,14 +1,14 @@ -Async local storage API surface +KV Storage: API surface @@ -13,6 +13,6 @@ test(() => { }, "Prerequisite check"); promise_test(t => { - return promise_rejects(t, "SecurityError", import("std:async-local-storage")); + return promise_rejects(t, "SecurityError", import("std:kv-storage")); }); diff --git a/tests/wpt/web-platform-tests/async-local-storage/non-secure-context-import-statement.tentative.html b/tests/wpt/web-platform-tests/kv-storage/non-secure-context-import-statement.html similarity index 82% rename from tests/wpt/web-platform-tests/async-local-storage/non-secure-context-import-statement.tentative.html rename to tests/wpt/web-platform-tests/kv-storage/non-secure-context-import-statement.html index 879729696db..fda02aadf14 100644 --- a/tests/wpt/web-platform-tests/async-local-storage/non-secure-context-import-statement.tentative.html +++ b/tests/wpt/web-platform-tests/kv-storage/non-secure-context-import-statement.html @@ -1,6 +1,6 @@ -Async local storage: should not work in non-secure contexts when included via an import statement +KV Storage: should not work in non-secure contexts when included via an import statement @@ -23,5 +23,5 @@ async_test(t => { diff --git a/tests/wpt/web-platform-tests/async-local-storage/non-secure-context-script-element.tentative.html b/tests/wpt/web-platform-tests/kv-storage/non-secure-context-script-element.html similarity index 79% rename from tests/wpt/web-platform-tests/async-local-storage/non-secure-context-script-element.tentative.html rename to tests/wpt/web-platform-tests/kv-storage/non-secure-context-script-element.html index feeddafc8da..66802b1254e 100644 --- a/tests/wpt/web-platform-tests/async-local-storage/non-secure-context-script-element.tentative.html +++ b/tests/wpt/web-platform-tests/kv-storage/non-secure-context-script-element.html @@ -1,6 +1,6 @@ -Async local storage: should not work in non-secure contexts when included via a script element +KV Storage: should not work in non-secure contexts when included via a script element @@ -22,4 +22,4 @@ async_test(t => { }); - + diff --git a/tests/wpt/web-platform-tests/async-local-storage/storage-smoke-test.tentative.https.html b/tests/wpt/web-platform-tests/kv-storage/storage-smoke-test.https.html similarity index 76% rename from tests/wpt/web-platform-tests/async-local-storage/storage-smoke-test.tentative.https.html rename to tests/wpt/web-platform-tests/kv-storage/storage-smoke-test.https.html index f978480ff2b..df6fd8c8181 100644 --- a/tests/wpt/web-platform-tests/async-local-storage/storage-smoke-test.tentative.https.html +++ b/tests/wpt/web-platform-tests/kv-storage/storage-smoke-test.https.html @@ -1,13 +1,13 @@ -Async local storage storage export smoke test +KV storage: storage export smoke test diff --git a/tests/wpt/web-platform-tests/portals/resources/portal-activate-event-portal.html b/tests/wpt/web-platform-tests/portals/resources/portal-activate-event-portal.html index d0eebcd12e6..b2759c3701a 100644 --- a/tests/wpt/web-platform-tests/portals/resources/portal-activate-event-portal.html +++ b/tests/wpt/web-platform-tests/portals/resources/portal-activate-event-portal.html @@ -1,13 +1,23 @@ Tests that the PortalActivateEvent is dispatched when a portal is activated diff --git a/tests/wpt/web-platform-tests/portals/resources/portal-activate-event-window.html b/tests/wpt/web-platform-tests/portals/resources/portal-activate-event-window.html index 1994dc3fad1..cf09caebc0f 100644 --- a/tests/wpt/web-platform-tests/portals/resources/portal-activate-event-window.html +++ b/tests/wpt/web-platform-tests/portals/resources/portal-activate-event-window.html @@ -1,11 +1,17 @@ - diff --git a/tests/wpt/web-platform-tests/resource-timing/resource_redirects.html b/tests/wpt/web-platform-tests/resource-timing/redirects.sub.html similarity index 64% rename from tests/wpt/web-platform-tests/resource-timing/resource_redirects.html rename to tests/wpt/web-platform-tests/resource-timing/redirects.sub.html index 606662afda4..0e3f405e14b 100644 --- a/tests/wpt/web-platform-tests/resource-timing/resource_redirects.html +++ b/tests/wpt/web-platform-tests/resource-timing/redirects.sub.html @@ -11,16 +11,22 @@ diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/xhr-response-url.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/xhr-response-url.https.html new file mode 100644 index 00000000000..9f00cdd1830 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/xhr-response-url.https.html @@ -0,0 +1,36 @@ + + +Service Worker: XHR responseURL uses the response url + + + + diff --git a/tests/wpt/web-platform-tests/storage/estimate-usage-details-service-workers.https.tentative.window.js b/tests/wpt/web-platform-tests/storage/estimate-usage-details-service-workers.https.tentative.window.js new file mode 100644 index 00000000000..cf3a2aa9430 --- /dev/null +++ b/tests/wpt/web-platform-tests/storage/estimate-usage-details-service-workers.https.tentative.window.js @@ -0,0 +1,38 @@ +// META: title=StorageManager: estimate() for service worker registrations +const wait_for_active = worker => new Promise(resolve =>{ + if (worker.active) { resolve(worker.active); } + + const listen_for_active = worker => e => { + if (e.target.state === 'activated') { resolve(worker.active); } + } + + if (worker.waiting) { + worker.waiting + .addEventListener('statechange', listen_for_active(worker.waiting)); + } + if (worker.installing) { + worker.installing + .addEventListener('statechange', listen_for_active(worker.installing)); + } +}); + +promise_test(async t => { + let estimate = await navigator.storage.estimate(); + const usageBeforeCreate = estimate.usageDetails.serviceWorkerRegistrations || + 0; + // Note: helpers.js is an arbitrary file; it could be any file that + // exists, but this test does not depend on the contents of said file. + const serviceWorkerRegistration = await + navigator.serviceWorker.register('./helpers.js'); + + t.add_cleanup(() => serviceWorkerRegistration.unregister()); + await wait_for_active(serviceWorkerRegistration); + + estimate = await navigator.storage.estimate(); + assert_true('serviceWorkerRegistrations' in estimate.usageDetails); + + const usageAfterCreate = estimate.usageDetails.serviceWorkerRegistrations; + assert_greater_than( + usageAfterCreate, usageBeforeCreate, + 'estimated usage should increase after service worker is registered'); +}, 'estimate() shows usage increase after large value is stored'); diff --git a/tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py b/tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py index 010a0c0a00a..8f649f1d098 100644 --- a/tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py +++ b/tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py @@ -66,8 +66,7 @@ def sourcefile_strategy(draw): @h.given(hs.lists(sourcefile_strategy(), - min_size=1, average_size=10, max_size=1000, - unique_by=lambda x: x.rel_path)) + min_size=1, max_size=1000, unique_by=lambda x: x.rel_path)) @h.example([SourceFileWithTest("a", "0"*40, item.ConformanceCheckerTest)]) def test_manifest_to_json(s): m = manifest.Manifest() @@ -83,8 +82,7 @@ def test_manifest_to_json(s): @h.given(hs.lists(sourcefile_strategy(), - min_size=1, average_size=10, - unique_by=lambda x: x.rel_path)) + min_size=1, unique_by=lambda x: x.rel_path)) @h.example([SourceFileWithTest("a", "0"*40, item.TestharnessTest)]) @h.example([SourceFileWithTest("a", "0"*40, item.RefTest, [("/aa", "==")])]) def test_manifest_idempotent(s): diff --git a/tests/wpt/web-platform-tests/tools/tox.ini b/tests/wpt/web-platform-tests/tools/tox.ini index fc66c6c2ac3..3b0c6d172bc 100644 --- a/tests/wpt/web-platform-tests/tools/tox.ini +++ b/tests/wpt/web-platform-tests/tools/tox.ini @@ -8,7 +8,6 @@ deps = pytest-cov mock hypothesis - pytest-catchlog commands = pytest --cov {posargs} diff --git a/tests/wpt/web-platform-tests/tools/wpt/browser.py b/tests/wpt/web-platform-tests/tools/wpt/browser.py index 71d1e61918a..ea8cc04f7d4 100644 --- a/tests/wpt/web-platform-tests/tools/wpt/browser.py +++ b/tests/wpt/web-platform-tests/tools/wpt/browser.py @@ -758,3 +758,32 @@ class WebKit(Browser): def version(self, binary=None, webdriver_binary=None): return None + + +class Epiphany(Browser): + """Epiphany-specific interface.""" + + product = "epiphany" + requirements = "requirements_epiphany.txt" + + def install(self, dest=None, channel=None): + raise NotImplementedError + + def find_binary(self, venv_path=None, channel=None): + return find_executable("epiphany") + + def find_webdriver(self, channel=None): + return find_executable("WebKitWebDriver") + + def install_webdriver(self, dest=None, channel=None): + raise NotImplementedError + + def version(self, binary=None, webdriver_binary=None): + if binary is None: + return None + output = call(binary, "--version") + if output: + # Stable release output looks like: "Web 3.30.2" + # Tech Preview output looks like "Web 3.31.3-88-g97db4f40f" + return output.split()[1] + return None diff --git a/tests/wpt/web-platform-tests/tools/wpt/run.py b/tests/wpt/web-platform-tests/tools/wpt/run.py index 44cf3137d41..633d6b254db 100644 --- a/tests/wpt/web-platform-tests/tools/wpt/run.py +++ b/tests/wpt/web-platform-tests/tools/wpt/run.py @@ -422,7 +422,7 @@ class Servo(BrowserSetup): binary = self.browser.find_binary(self.venv.path, None) if binary is None: - raise WptrunError("Unable to find servo binary on the PATH") + raise WptrunError("Unable to find servo binary in PATH") kwargs["binary"] = binary @@ -442,6 +442,29 @@ class WebKit(BrowserSetup): pass +class Epiphany(BrowserSetup): + name = "epiphany" + browser_cls = browser.Epiphany + + def install(self, venv, channel=None): + raise NotImplementedError + + def setup_kwargs(self, kwargs): + if kwargs["binary"] is None: + binary = self.browser.find_binary() + + if binary is None: + raise WptrunError("Unable to find epiphany in PATH") + kwargs["binary"] = binary + + if kwargs["webdriver_binary"] is None: + webdriver_binary = self.browser.find_webdriver() + + if webdriver_binary is None: + raise WptrunError("Unable to find WebKitWebDriver in PATH") + kwargs["webdriver_binary"] = webdriver_binary + + product_setup = { "fennec": Fennec, "firefox": Firefox, @@ -456,6 +479,7 @@ product_setup = { "sauce": Sauce, "opera": Opera, "webkit": WebKit, + "epiphany": Epiphany, } diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_epiphany.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_epiphany.txt new file mode 100644 index 00000000000..9115b7ac4e8 --- /dev/null +++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_epiphany.txt @@ -0,0 +1 @@ +mozprocess == 0.26 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/__init__.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/__init__.py index f86792d4741..fdedda44d28 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/__init__.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/__init__.py @@ -34,4 +34,5 @@ product_list = ["chrome", "servo", "servodriver", "opera", - "webkit"] + "webkit", + "epiphany"] diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/epiphany.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/epiphany.py new file mode 100644 index 00000000000..599ec9f3110 --- /dev/null +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/epiphany.py @@ -0,0 +1,74 @@ +from .base import get_timeout_multiplier # noqa: F401 +from .webkit import WebKitBrowser +from ..executors import executor_kwargs as base_executor_kwargs +from ..executors.executorwebdriver import (WebDriverTestharnessExecutor, # noqa: F401 + WebDriverRefTestExecutor) # noqa: F401 +from ..executors.executorwebkit import WebKitDriverWdspecExecutor # noqa: F401 + +__wptrunner__ = {"product": "epiphany", + "check_args": "check_args", + "browser": "EpiphanyBrowser", + "browser_kwargs": "browser_kwargs", + "executor": {"testharness": "WebDriverTestharnessExecutor", + "reftest": "WebDriverRefTestExecutor", + "wdspec": "WebKitDriverWdspecExecutor"}, + "executor_kwargs": "executor_kwargs", + "env_extras": "env_extras", + "env_options": "env_options", + "run_info_extras": "run_info_extras", + "timeout_multiplier": "get_timeout_multiplier"} + + +def check_args(**kwargs): + pass + + +def browser_kwargs(test_type, run_info_data, config, **kwargs): + return {"binary": kwargs["binary"], + "webdriver_binary": kwargs["webdriver_binary"], + "webdriver_args": kwargs.get("webdriver_args")} + + +def capabilities(server_config, **kwargs): + args = kwargs.get("binary_args", []) + if "--automation-mode" not in args: + args.append("--automation-mode") + + return { + "browserName": "Epiphany", + "browserVersion": "3.31.4", # First version to support automation + "platformName": "ANY", + "webkitgtk:browserOptions": { + "binary": kwargs["binary"], + "args": args, + "certificates": [ + {"host": server_config["browser_host"], + "certificateFile": kwargs["host_cert_path"]}]}} + + +def executor_kwargs(test_type, server_config, cache_manager, run_info_data, + **kwargs): + executor_kwargs = base_executor_kwargs(test_type, server_config, + cache_manager, run_info_data, **kwargs) + executor_kwargs["close_after_done"] = True + executor_kwargs["capabilities"] = capabilities(server_config, **kwargs) + return executor_kwargs + + +def env_extras(**kwargs): + return [] + + +def env_options(): + return {} + + +def run_info_extras(**kwargs): + return {"webkit_port": "gtk"} + + +class EpiphanyBrowser(WebKitBrowser): + def __init__(self, logger, binary=None, webdriver_binary=None, + webdriver_args=None): + WebKitBrowser.__init__(self, logger, binary, webdriver_binary, + webdriver_args) diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-close.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-close.html new file mode 100644 index 00000000000..b5555b0137a --- /dev/null +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-close.html @@ -0,0 +1,161 @@ + + + + Test AudioParam events very close in time + + + + + + + + + +