Merge pull request #7812 from w3c/sync_0b1d7c5da0bff403d363c43f20c7f7227db42a48
Tidy up processing-a-keyframes-argument-002.html;
diff --git a/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-002.html b/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-002.html
index 62fedbc..eda0e57 100644
--- a/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-002.html
+++ b/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-002.html
@@ -13,50 +13,46 @@
<script>
'use strict';
-test(function(t) {
- gEasingValueTests.forEach(function(subtest) {
- var easing = subtest[0];
- var expected = subtest[1];
- var effect = new KeyframeEffectReadOnly(target, {
- left: ["10px", "20px"],
+test(function() {
+ for (const [easing, expected] of gEasingValueTests) {
+ const effect = new KeyframeEffectReadOnly(target, {
+ left: ['10px', '20px'],
easing: easing
});
assert_equals(effect.getKeyframes()[0].easing, expected,
- "resulting easing for '" + easing + "'");
- });
-}, "easing values are parsed correctly when passed to the " +
- "KeyframeEffectReadOnly constructor in a property-indexed keyframe");
+ `resulting easing for '${easing}'`);
+ }
+}, 'easing values are parsed correctly when passed to the ' +
+ 'KeyframeEffectReadOnly constructor in a property-indexed keyframe');
-test(function(t) {
- gEasingValueTests.forEach(function(subtest) {
- var easing = subtest[0];
- var expected = subtest[1];
- var effect = new KeyframeEffectReadOnly(target, [
- { offset: 0, left: "10px", easing: easing },
- { offset: 1, left: "20px" }
+test(function() {
+ for (const [easing, expected] of gEasingValueTests) {
+ const effect = new KeyframeEffectReadOnly(target, [
+ { offset: 0, left: '10px', easing: easing },
+ { offset: 1, left: '20px' }
]);
assert_equals(effect.getKeyframes()[0].easing, expected,
- "resulting easing for '" + easing + "'");
- });
-}, "easing values are parsed correctly when passed to the " +
- "KeyframeEffectReadOnly constructor in regular keyframes");
+ `resulting easing for '${easing}'`);
+ }
+}, 'easing values are parsed correctly when passed to the ' +
+ 'KeyframeEffectReadOnly constructor in regular keyframes');
-test(function(t) {
- gInvalidEasings.forEach(invalidEasing => {
+test(function() {
+ for (const invalidEasing of gInvalidEasings) {
assert_throws(new TypeError, () => {
new KeyframeEffectReadOnly(target, { easing: invalidEasing });
}, `TypeError is thrown for easing '${invalidEasing}'`);
- });
-}, 'invalid easing values are correctly rejected when passed to the ' +
+ }
+}, 'Invalid easing values are correctly rejected when passed to the ' +
'KeyframeEffectReadOnly constructor in regular keyframes');
-test(function(t) {
- gInvalidEasings.forEach(invalidEasing => {
+test(function() {
+ for (const invalidEasing of gInvalidEasings) {
assert_throws(new TypeError, () => {
new KeyframeEffectReadOnly(target, [{ easing: invalidEasing }]);
}, `TypeError is thrown for easing '${invalidEasing}'`);
- });
-}, 'invalid easing values are correctly rejected when passed to the ' +
+ }
+}, 'Invalid easing values are correctly rejected when passed to the ' +
'KeyframeEffectReadOnly constructor in a keyframe sequence');
</script>