aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/fill.html
diff options
context:
space:
mode:
Diffstat (limited to 'tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/fill.html')
-rw-r--r--tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/fill.html25
1 files changed, 13 insertions, 12 deletions
diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/fill.html b/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/fill.html
index 89f6a467938..01739478f47 100644
--- a/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/fill.html
+++ b/tests/wpt/web-platform-tests/web-animations/interfaces/AnimationEffectTiming/fill.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<meta charset=utf-8>
-<title>fill tests</title>
-<link rel="help" href="https://w3c.github.io/web-animations/#dom-animationeffecttiming-fill">
+<title>AnimationEffectTiming.fill</title>
+<link rel="help" href="https://drafts.csswg.org/web-animations/#dom-animationeffecttiming-fill">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../../testcommon.js"></script>
@@ -10,20 +10,21 @@
<script>
'use strict';
-test(function(t) {
- var anim = createDiv(t).animate(null);
+test(t => {
+ const anim = createDiv(t).animate(null);
assert_equals(anim.effect.timing.fill, 'auto');
-}, 'Test default value');
+}, 'Has the default value \'auto\'');
-["none", "forwards", "backwards", "both", ].forEach(function(fill){
- test(function(t) {
- var div = createDiv(t);
- var anim = div.animate({ opacity: [ 0, 1 ] }, 100);
+for (const fill of ['none', 'forwards', 'backwards', 'both']) {
+ test(t => {
+ const div = createDiv(t);
+ const anim = div.animate({ opacity: [ 0, 1 ] }, 100);
anim.effect.timing.fill = fill;
assert_equals(anim.effect.timing.fill, fill, 'set fill ' + fill);
- assert_equals(anim.effect.getComputedTiming().fill, fill, 'getComputedTiming() after set fill ' + fill);
- }, 'set fill ' + fill);
-});
+ assert_equals(anim.effect.getComputedTiming().fill, fill,
+ 'getComputedTiming() after set fill ' + fill);
+ }, `Can set fill to ${fill}`);
+}
</script>
</body>