mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Update web-platform-tests to revision 14cfa4d648cc1c853b4153268df672d21425f8c1
This commit is contained in:
parent
1b73cf3352
commit
75736751d9
1213 changed files with 19434 additions and 12344 deletions
|
@ -25,7 +25,7 @@ test(function(t) {
|
|||
duration: 100,
|
||||
delay: 1 });
|
||||
anim.effect.timing.iterationStart = 2.5;
|
||||
assert_equals(anim.effect.getComputedTiming().progress, 0.5);
|
||||
assert_times_equal(anim.effect.getComputedTiming().progress, 0.5);
|
||||
assert_equals(anim.effect.getComputedTiming().currentIteration, 2);
|
||||
}, 'Test that changing the iterationStart affects computed timing ' +
|
||||
'when backwards-filling');
|
||||
|
@ -39,7 +39,7 @@ test(function(t) {
|
|||
duration: 100,
|
||||
delay: 0 });
|
||||
anim.effect.timing.iterationStart = 2.5;
|
||||
assert_equals(anim.effect.getComputedTiming().progress, 0.5);
|
||||
assert_times_equal(anim.effect.getComputedTiming().progress, 0.5);
|
||||
assert_equals(anim.effect.getComputedTiming().currentIteration, 2);
|
||||
}, 'Test that changing the iterationStart affects computed timing ' +
|
||||
'during the active phase');
|
||||
|
@ -54,7 +54,7 @@ test(function(t) {
|
|||
delay: 0 });
|
||||
anim.finish();
|
||||
anim.effect.timing.iterationStart = 2.5;
|
||||
assert_equals(anim.effect.getComputedTiming().progress, 0.5);
|
||||
assert_times_equal(anim.effect.getComputedTiming().progress, 0.5);
|
||||
assert_equals(anim.effect.getComputedTiming().currentIteration, 3);
|
||||
}, 'Test that changing the iterationStart affects computed timing ' +
|
||||
'when forwards-filling');
|
||||
|
|
|
@ -17,6 +17,11 @@
|
|||
// }
|
||||
//
|
||||
function assert_computed_timing_for_each_phase(animation, property, values) {
|
||||
// Some computed timing properties (e.g. 'progress') require floating-point
|
||||
// comparison, whilst exact equality suffices for others.
|
||||
const assert_property_equals =
|
||||
(property === 'progress') ? assert_times_equal : assert_equals;
|
||||
|
||||
const effect = animation.effect;
|
||||
const timing = effect.getComputedTiming();
|
||||
|
||||
|
@ -33,8 +38,8 @@ function assert_computed_timing_for_each_phase(animation, property, values) {
|
|||
} else {
|
||||
animation.currentTime = beforeActive;
|
||||
}
|
||||
assert_equals(effect.getComputedTiming()[property], values.before,
|
||||
`Value of ${property} in the before phase`);
|
||||
assert_property_equals(effect.getComputedTiming()[property], values.before,
|
||||
`Value of ${property} in the before phase`);
|
||||
|
||||
// Active phase
|
||||
if (effect.getComputedTiming().activeDuration > 0) {
|
||||
|
@ -43,8 +48,8 @@ function assert_computed_timing_for_each_phase(animation, property, values) {
|
|||
} else {
|
||||
animation.currentTime = activeAfter;
|
||||
}
|
||||
assert_equals(effect.getComputedTiming()[property], values.activeBoundary,
|
||||
`Value of ${property} at the boundary of the active phase`);
|
||||
assert_property_equals(effect.getComputedTiming()[property], values.activeBoundary,
|
||||
`Value of ${property} at the boundary of the active phase`);
|
||||
} else {
|
||||
assert_equals(values.activeBoundary, undefined,
|
||||
'Test specifies a value to check during the active phase but'
|
||||
|
@ -58,8 +63,8 @@ function assert_computed_timing_for_each_phase(animation, property, values) {
|
|||
} else {
|
||||
animation.currentTime = activeAfter + 1;
|
||||
}
|
||||
assert_equals(effect.getComputedTiming()[property], values.after,
|
||||
`Value of ${property} in the after phase`);
|
||||
assert_property_equals(effect.getComputedTiming()[property], values.after,
|
||||
`Value of ${property} in the after phase`);
|
||||
} else {
|
||||
assert_equals(values.after, undefined,
|
||||
'Test specifies a value to check during the after phase but'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue