зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1564745 [wpt PR 17615] - [animation-worklet] expose animatorName per specification, a=testonly
Automatic update from web-platform-tests [animation-worklet] expose animatorName per specification Relevant specification section: https://drafts.css-houdini.org/css-animationworklet/#creating-worklet-animation Change-Id: Ic791b43b10a4e03e1c8b84818a367d518cb004cc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1681048 Reviewed-by: Majid Valipour <majidvp@chromium.org> Reviewed-by: Yi Gu <yigu@chromium.org> Commit-Queue: Majid Valipour <majidvp@chromium.org> Cr-Commit-Position: refs/heads/master@{#674501} -- wpt-commits: a01f0c6f1cfa24891c019839970468ee19e8de2d wpt-pr: 17615
This commit is contained in:
Родитель
17ba7682cd
Коммит
fabe4c0747
|
@ -0,0 +1,30 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<title>Worklet Animation's animator name should be accessible via animatorName property</title>
|
||||
<link rel="help" href="https://drafts.css-houdini.org/css-animationworklet/">
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="common.js"></script>
|
||||
|
||||
<script id="test_animator" type="text/worklet">
|
||||
class NoopAnimator {
|
||||
animate(currentTime, effect) {}
|
||||
}
|
||||
registerAnimator('Tokyo', NoopAnimator);
|
||||
registerAnimator('دزفول', NoopAnimator);
|
||||
</script>
|
||||
|
||||
<body></body>
|
||||
|
||||
<script>
|
||||
promise_test(async t => {
|
||||
await runInAnimationWorklet(document.getElementById('test_animator').textContent);
|
||||
|
||||
// An ascii name and a non-ascii one.
|
||||
for (let name of ['Tokyo', 'دزفول']) {
|
||||
const animation = new WorkletAnimation(name, new KeyframeEffect(document.body, {}));
|
||||
assert_equals(name, animation.animatorName);
|
||||
}
|
||||
}, 'Verify that animatorName matches passed name');
|
||||
</script>
|
Загрузка…
Ссылка в новой задаче