diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini new file mode 100644 index 00000000000..f29da48a2a0 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini @@ -0,0 +1,4 @@ +[hit-test-floats-003.html] + [Miss float below something else] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini new file mode 100644 index 00000000000..4bfb0c2053a --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini @@ -0,0 +1,4 @@ +[hit-test-floats-004.html] + [Miss float below something else] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini new file mode 100644 index 00000000000..baa9f1a7541 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini @@ -0,0 +1,4 @@ +[hit-test-floats-005.html] + [Miss clipped float] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/normal-flow/min-height-applies-to-013.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/normal-flow/min-height-applies-to-013.xht.ini new file mode 100644 index 00000000000..9206a00a170 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/normal-flow/min-height-applies-to-013.xht.ini @@ -0,0 +1,2 @@ +[min-height-applies-to-013.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/normal-flow/min-height-applies-to-014.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/normal-flow/min-height-applies-to-014.xht.ini new file mode 100644 index 00000000000..f6e7c61b425 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/normal-flow/min-height-applies-to-014.xht.ini @@ -0,0 +1,2 @@ +[min-height-applies-to-014.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini b/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini index 4a1e8110f6f..f8e7e539aae 100644 --- a/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini @@ -2,3 +2,6 @@ [Hit test intersecting scaled box] expected: FAIL + [Hit test within unscaled box] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini index 23c61ede1a1..c131078eace 100644 --- a/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini @@ -17,6 +17,3 @@ [test the top of layer] expected: FAIL - [test some point of the element: top left corner] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/elementsFromPoint-invalid-cases.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/elementsFromPoint-invalid-cases.html.ini deleted file mode 100644 index e181af5397f..00000000000 --- a/tests/wpt/metadata-layout-2020/css/cssom-view/elementsFromPoint-invalid-cases.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[elementsFromPoint-invalid-cases.html] - [The root element is the last element returned for otherwise empty queries within the viewport] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini index dae4682b753..156f3115faf 100644 --- a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini @@ -321,15 +321,18 @@ [ diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-3.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-3.html index c7c56d670e5..c3e5dc1fd6a 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-3.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-3.html @@ -9,10 +9,6 @@ - - diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/load-into-the-iframe.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/load-into-the-iframe.html index 05a80be7374..9e08eb587ab 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/load-into-the-iframe.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/load-into-the-iframe.html @@ -7,13 +7,18 @@ diff --git a/tests/wpt/web-platform-tests/interfaces/BackgroundSync.idl b/tests/wpt/web-platform-tests/interfaces/background-sync.idl similarity index 100% rename from tests/wpt/web-platform-tests/interfaces/BackgroundSync.idl rename to tests/wpt/web-platform-tests/interfaces/background-sync.idl diff --git a/tests/wpt/web-platform-tests/lint.ignore b/tests/wpt/web-platform-tests/lint.ignore index 078a706f079..9d057e76edc 100644 --- a/tests/wpt/web-platform-tests/lint.ignore +++ b/tests/wpt/web-platform-tests/lint.ignore @@ -757,6 +757,7 @@ TESTHARNESS-IN-OTHER-TYPE: html/semantics/interactive-elements/the-summary-eleme TESTHARNESS-IN-OTHER-TYPE: html/semantics/text-level-semantics/the-ruby-element/rt-without-ruby-crash.html TESTHARNESS-IN-OTHER-TYPE: portals/portals-no-frame-crash.html TESTHARNESS-IN-OTHER-TYPE: quirks/table-replaced-descendant-percentage-height-crash.html +TESTHARNESS-IN-OTHER-TYPE: scroll-animations/null-scroll-source-crash.html TESTHARNESS-IN-OTHER-TYPE: svg/extensibility/foreignObject/foreign-object-circular-filter-reference-crash.html TESTHARNESS-IN-OTHER-TYPE: svg/extensibility/foreignObject/foreign-object-under-clip-path-crash.html TESTHARNESS-IN-OTHER-TYPE: svg/extensibility/foreignObject/foreign-object-under-defs-crash.html diff --git a/tests/wpt/web-platform-tests/manifest/META.yml b/tests/wpt/web-platform-tests/manifest/META.yml new file mode 100644 index 00000000000..013fc58a29f --- /dev/null +++ b/tests/wpt/web-platform-tests/manifest/META.yml @@ -0,0 +1,5 @@ +spec: https://w3c.github.io/manifest/ +suggested_reviewers: + - marcoscaceres + - mgiuca + - kenchris diff --git a/tests/wpt/web-platform-tests/manifest/link-rel-manifest.html b/tests/wpt/web-platform-tests/manifest/link-rel-manifest.html new file mode 100644 index 00000000000..8eb39703a08 --- /dev/null +++ b/tests/wpt/web-platform-tests/manifest/link-rel-manifest.html @@ -0,0 +1,11 @@ + +Test that "manifest" is a supported value for the `rel` of a `link` + + + + diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-no-child-bad-subdomain.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/parent-no-child-bad-subdomain.sub.https.html new file mode 100644 index 00000000000..2653dabd980 --- /dev/null +++ b/tests/wpt/web-platform-tests/origin-isolation/parent-no-child-bad-subdomain.sub.https.html @@ -0,0 +1,33 @@ + + +Parent is not isolated, child attempts to isolate but uses a bad header value, child is a subdomain of the parent + + + +
+ + diff --git a/tests/wpt/web-platform-tests/origin-isolation/parent-no-child-yes-with-params-subdomain.sub.https.html b/tests/wpt/web-platform-tests/origin-isolation/parent-no-child-yes-with-params-subdomain.sub.https.html new file mode 100644 index 00000000000..164a19ff381 --- /dev/null +++ b/tests/wpt/web-platform-tests/origin-isolation/parent-no-child-yes-with-params-subdomain.sub.https.html @@ -0,0 +1,34 @@ + + +Parent is not isolated, child is isolated using parameters on its structured header, child is a subdomain of the parent + + + +
+ + diff --git a/tests/wpt/web-platform-tests/scroll-animations/animation-with-animatable-interface.html b/tests/wpt/web-platform-tests/scroll-animations/animation-with-animatable-interface.html new file mode 100644 index 00000000000..4c3fa027fd0 --- /dev/null +++ b/tests/wpt/web-platform-tests/scroll-animations/animation-with-animatable-interface.html @@ -0,0 +1,70 @@ + +Scroll-linked animation with Animatable interface + + + + + + + + + +
+
+
+
+
+ + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/scroll-animations/null-scroll-source-crash.html b/tests/wpt/web-platform-tests/scroll-animations/null-scroll-source-crash.html new file mode 100644 index 00000000000..5ffc522d68e --- /dev/null +++ b/tests/wpt/web-platform-tests/scroll-animations/null-scroll-source-crash.html @@ -0,0 +1,26 @@ + + + + + +
+ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/embed-and-object-are-not-intercepted.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/embed-and-object-are-not-intercepted.https.html index 34556a785ae..581dbeca977 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/embed-and-object-are-not-intercepted.https.html +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/embed-and-object-are-not-intercepted.https.html @@ -75,4 +75,30 @@ promise_test(t => { }); }, 'requests for OBJECT elements of an image should not be intercepted by service workers'); +promise_test(t => { + let frame; + return with_iframe('resources/object-navigation-is-not-intercepted-iframe.html') + .then(f => { + frame = f; + t.add_cleanup(() => { frame.remove(); }); + return frame.contentWindow.test_promise; + }) + .then(result => { + assert_equals(result, 'request for embedded content was not intercepted'); + }); + }, 'post-load navigation of OBJECT elements should not be intercepted by service workers'); + + +promise_test(t => { + let frame; + return with_iframe('resources/embed-navigation-is-not-intercepted-iframe.html') + .then(f => { + frame = f; + t.add_cleanup(() => { frame.remove(); }); + return frame.contentWindow.test_promise; + }) + .then(result => { + assert_equals(result, 'request for embedded content was not intercepted'); + }); + }, 'post-load navigation of EMBED elements should not be intercepted by service workers'); diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/embed-navigation-is-not-intercepted-iframe.html b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/embed-navigation-is-not-intercepted-iframe.html new file mode 100644 index 00000000000..5e86f67735f --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/embed-navigation-is-not-intercepted-iframe.html @@ -0,0 +1,23 @@ + + +iframe for embed-and-object-are-not-intercepted test + + + + diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/object-navigation-is-not-intercepted-iframe.html b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/object-navigation-is-not-intercepted-iframe.html new file mode 100644 index 00000000000..5c8ab79a500 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/object-navigation-is-not-intercepted-iframe.html @@ -0,0 +1,24 @@ + + +iframe for embed-and-object-are-not-intercepted test + + + + + diff --git a/tests/wpt/web-platform-tests/tools/docker/README.md b/tests/wpt/web-platform-tests/tools/docker/README.md index 9342aded298..2203727ef96 100644 --- a/tests/wpt/web-platform-tests/tools/docker/README.md +++ b/tests/wpt/web-platform-tests/tools/docker/README.md @@ -4,15 +4,13 @@ images must be updated as well. Doing this requires you be part of the 'webplatformtests' organization on Docker Hub; ping @Hexcles or @stephenmcgruer if you are not a member. -In this directory, run the following, where `` is of the form -`webplatformtests/wpt:{current-version + 0.01}`: +The tag for a new docker image is of the form +`webplatformtests/wpt:{current-version + 0.01}` -```sh -# --pull forces Docker to get the newest base image. -docker build --pull -t . -docker push -``` +To update the docker image: -Then update the following Taskcluster configurations to use the new image: -* `.taskcluster.yml` (the decision task) -* `tools/ci/tc/tasks/test.yml` (all the other tasks) +* Update the following Taskcluster configurations to use the new image: + - `.taskcluster.yml` (the decision task) + - `tools/ci/tc/tasks/test.yml` (all the other tasks) + +* Run `wpt docker-push` diff --git a/tests/wpt/web-platform-tests/tools/docker/commands.json b/tests/wpt/web-platform-tests/tools/docker/commands.json index 15182cc9e65..421b0a636c2 100644 --- a/tests/wpt/web-platform-tests/tools/docker/commands.json +++ b/tests/wpt/web-platform-tests/tools/docker/commands.json @@ -1,6 +1,26 @@ { - "docker-run": {"path": "frontend.py", "script": "run", "parser": "parser_run", "help": "Run wpt docker image", - "virtualenv": false}, - "docker-build": {"path": "frontend.py", "script": "build", "help": "Build wpt docker image", - "virtualenv": false} + "docker-run": { + "path": "frontend.py", + "script": "run", + "parser": "parser_run", + "help": "Run wpt docker image", + "virtualenv": false + }, + "docker-build": { + "path": "frontend.py", + "script": "build", + "help": "Build wpt docker image", + "virtualenv": false + }, + "docker-push": { + "path": "frontend.py", + "script": "push", + "parser": "parser_push", + "help": "Build and push wpt docker image", + "virtualenv": true, + "install": [ + "requests", + "pyyaml" + ] + } } diff --git a/tests/wpt/web-platform-tests/tools/docker/frontend.py b/tests/wpt/web-platform-tests/tools/docker/frontend.py index 59a1cff2ebd..6d35d4c3826 100644 --- a/tests/wpt/web-platform-tests/tools/docker/frontend.py +++ b/tests/wpt/web-platform-tests/tools/docker/frontend.py @@ -1,18 +1,111 @@ import argparse -import subprocess +import logging import os +import re +import subprocess +import sys + +from six import iteritems here = os.path.abspath(os.path.dirname(__file__)) wpt_root = os.path.abspath(os.path.join(here, os.pardir, os.pardir)) -def build(*args, **kwargs): +logger = logging.getLogger() + + +def build(tag="wpt:local", *args, **kwargs): subprocess.check_call(["docker", "build", "--pull", - "--tag", "wpt:local", + "--tag", tag, here]) +def parser_push(): + parser = argparse.ArgumentParser() + parser.add_argument("--tag", action="store", + help="Tag to use (default is taken from .taskcluster.yml)") + parser.add_argument("--force", action="store_true", + help="Ignore warnings and push anyway") + return parser + + +def walk_yaml(root, target): + rv = [] + if isinstance(root, list): + for value in root: + if isinstance(value, (dict, list)): + rv.extend(walk_yaml(value, target)) + elif isinstance(root, dict): + for key, value in iteritems(root): + if isinstance(value, (dict, list)): + rv.extend(walk_yaml(value, target)) + elif key == target: + rv.append(value) + return rv + + +def read_image_name(): + import yaml + with open(os.path.join(wpt_root, ".taskcluster.yml")) as f: + taskcluster_data = yaml.safe_load(f) + taskcluster_values = set(walk_yaml(taskcluster_data, "image")) + with open(os.path.join(wpt_root, "tools", "ci", "tc", "tasks", "test.yml")) as f: + test_data = yaml.safe_load(f) + tests_value = test_data["components"]["wpt-base"]["image"] + return taskcluster_values, tests_value + + +def lookup_tag(tag): + import requests + org, repo_version = tag.split("/", 1) + repo, version = repo_version.rsplit(":", 1) + resp = requests.get("https://hub.docker.com/v2/repositories/%s/%s/tags/%s" % + (org, repo, version)) + if resp.status_code == 200: + return True + if resp.status_code == 404: + return False + resp.raise_for_status() + + +def push(venv, tag=None, force=False, *args, **kwargs): + taskcluster_tags, tests_tag = read_image_name() + + taskcluster_tag = taskcluster_tags.pop() + + error_log = logger.warning if force else logger.error + if len(taskcluster_tags) != 0 or tests_tag != taskcluster_tag: + error_log("Image names in .taskcluster.yml and tools/ci/tc/tasks/test.yml " + "don't match.") + if not force: + sys.exit(1) + if tag is not None and tag != taskcluster_tag: + error_log("Supplied tag doesn't match .taskcluster.yml or " + "tools/ci/tc/tasks/test.yml; remember to update before pushing") + if not force: + sys.exit(1) + if tag is None: + logger.info("Using tag %s from .taskcluster.yml" % taskcluster_tag) + tag = taskcluster_tag + + tag_re = re.compile(r"webplatformtests/wpt:\d\.\d+") + if not tag_re.match(tag): + error_log("Tag doesn't match expected format webplatformtests/wpt:0.x") + if not force: + sys.exit(1) + + if lookup_tag(tag): + # No override for this case + logger.critical("Tag %s already exists" % tag) + sys.exit(1) + + build(tag) + subprocess.check_call(["docker", + "push", + tag]) + + def parser_run(): parser = argparse.ArgumentParser() parser.add_argument("--rebuild", action="store_true", help="Force rebuild of image") diff --git a/tests/wpt/web-platform-tests/tools/quic/README.md b/tests/wpt/web-platform-tests/tools/quic/README.md index 5a64b701cfb..ef1d66e3220 100644 --- a/tests/wpt/web-platform-tests/tools/quic/README.md +++ b/tests/wpt/web-platform-tests/tools/quic/README.md @@ -11,20 +11,23 @@ authors can implement custom handlers by putting python scripts in ## Custom Handlers The QuicTransportServer calls functions defined in each handler script. - - handle_client_indication is called during the client indication process. + - `handle_client_indication` is called during the client indication process. This function is called with three arguments: - - connection: aioquic.asyncio.QuicConnectionProtocol - - origin: str The origin of the initiator. - - query: Dict[str, str] The dictionary of query parameters of the URL of the - connection. + - `connection`: [`aioquic.asyncio.QuicConnectionProtocol`](protocol) + - `origin`: `str` The origin of the initiator. + - `query`: `Dict[str, str]` The dictionary of query parameters of the URL of the + connection. A handler can abort the client indication process either by raising an exception or closing the connection. - - handle_event is called when a QuicEvent arrives. - - connection: aioquic.asyncio.QuicConnectionProtocol - - event: aioquic.quic.events.QuicEvent + - `handle_event` is called when a [`QuicEvent`](event) arrives. + - `connection`: [`aioquic.asyncio.QuicConnectionProtocol`](protocol) + - `event`: [`aioquic.quic.events.QuicEvent`](event) This function is not called until the client indication process finishes successfully. + +[protocol]: https://aioquic.readthedocs.io/en/latest/asyncio.html#aioquic.asyncio.QuicConnectionProtocol +[event]: https://aioquic.readthedocs.io/en/latest/quic.html#module-aioquic.quic.events diff --git a/tests/wpt/web-platform-tests/tools/wpt/run.py b/tests/wpt/web-platform-tests/tools/wpt/run.py index a9fdeada1ec..95d9369f2a8 100644 --- a/tests/wpt/web-platform-tests/tools/wpt/run.py +++ b/tests/wpt/web-platform-tests/tools/wpt/run.py @@ -156,11 +156,10 @@ class BrowserSetup(object): name = None browser_cls = None - def __init__(self, venv, prompt=True, sub_product=None): + def __init__(self, venv, prompt=True): self.browser = self.browser_cls(logger) self.venv = venv self.prompt = prompt - self.sub_product = sub_product def prompt_install(self, component): if not self.prompt: @@ -588,8 +587,10 @@ class Sauce(BrowserSetup): raise NotImplementedError def setup_kwargs(self, kwargs): - kwargs.set_if_none("sauce_browser", self.sub_product[0]) - kwargs.set_if_none("sauce_version", self.sub_product[1]) + if kwargs["sauce_browser"] is None: + raise WptrunError("Missing required argument --sauce-browser") + if kwargs["sauce_version"] is None: + raise WptrunError("Missing required argument --sauce-version") kwargs["test_types"] = ["testharness", "reftest"] @@ -719,9 +720,7 @@ def setup_wptrunner(venv, prompt=True, install_browser=False, **kwargs): kwargs = utils.Kwargs(iteritems(kwargs)) - product_parts = kwargs["product"].split(":") - kwargs["product"] = product_parts[0].replace("-", "_") - sub_product = product_parts[1:] + kwargs["product"] = kwargs["product"].replace("-", "_") check_environ(kwargs["product"]) args_general(kwargs) @@ -729,7 +728,7 @@ def setup_wptrunner(venv, prompt=True, install_browser=False, **kwargs): if kwargs["product"] not in product_setup: raise WptrunError("Unsupported product %s" % kwargs["product"]) - setup_cls = product_setup[kwargs["product"]](venv, prompt, sub_product) + setup_cls = product_setup[kwargs["product"]](venv, prompt) setup_cls.install_requirements() affected_revish = kwargs.pop("affected", None) diff --git a/tests/wpt/web-platform-tests/tools/wpt/tests/test_run.py b/tests/wpt/web-platform-tests/tools/wpt/tests/test_run.py index ef58ec41b2b..d533977e0c7 100644 --- a/tests/wpt/web-platform-tests/tools/wpt/tests/test_run.py +++ b/tests/wpt/web-platform-tests/tools/wpt/tests/test_run.py @@ -69,5 +69,6 @@ def test_setup_wptrunner(venv, logger, product): kwargs["binary"] = sys.argv[0] kwargs["webdriver_binary"] = sys.argv[0] if kwargs["product"] == "sauce": - kwargs["product"] = "sauce:firefox:63" + kwargs["sauce_browser"] = "firefox" + kwargs["sauce_version"] = "63" run.setup_wptrunner(venv, **kwargs) diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/Animatable/animate.html b/tests/wpt/web-platform-tests/web-animations/interfaces/Animatable/animate.html index 00e68b42962..dad633ba9a2 100644 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/Animatable/animate.html +++ b/tests/wpt/web-platform-tests/web-animations/interfaces/Animatable/animate.html @@ -202,6 +202,18 @@ async_test(t => { }, 'Element.animate() correctly sets the Animation\'s timeline when ' + 'triggered on an element in a different document'); +for (const subtest of gAnimationTimelineTests) { + test(t => { + const anim = createDiv(t).animate(null, { timeline: subtest.timeline }); + assert_not_equals(anim, null, + 'An animation sohuld be created'); + assert_equals(anim.timeline, subtest.expectedTimeline, + 'Animation timeline should be '+ + subtest.expectedTimelineDescription); + }, 'Element.animate() correctly sets the Animation\'s timeline ' + + subtest.description + ' in KeyframeAnimationOptions.'); +} + test(t => { const anim = createDiv(t).animate(null, 2000); assert_equals(anim.playState, 'running'); diff --git a/tests/wpt/web-platform-tests/web-animations/resources/keyframe-tests.js b/tests/wpt/web-platform-tests/web-animations/resources/keyframe-tests.js index 3cf3cf22bf8..43e0d7575f2 100644 --- a/tests/wpt/web-platform-tests/web-animations/resources/keyframe-tests.js +++ b/tests/wpt/web-platform-tests/web-animations/resources/keyframe-tests.js @@ -796,3 +796,32 @@ const gInvalidKeyframeEffectOptionTests = [ { desc: 'a variable easing', input: { easing: 'var(--x)' } }, { desc: 'a multi-value easing', input: { easing: 'ease-in-out, ease-out' } }, ]; + +// There is currently only ScrollTimeline that can be constructed and used here +// beyond document timeline. Given that ScrollTimeline is not stable as of yet +// it's tested in scroll-animations/animation-with-animatable-interface.html. +const gAnimationTimelineTests = [ + { + expectedTimeline: document.timeline, + expectedTimelineDescription: 'document.timeline', + description: 'with no timeline parameter' + }, + { + timeline: undefined, + expectedTimeline: document.timeline, + expectedTimelineDescription: 'document.timeline', + description: 'with undefined timeline' + }, + { + timeline: null, + expectedTimeline: null, + expectedTimelineDescription: 'null', + description: 'with null timeline' + }, + { + timeline: document.timeline, + expectedTimeline: document.timeline, + expectedTimelineDescription: 'document.timeline', + description: 'with DocumentTimeline' + }, +]; \ No newline at end of file