mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update web-platform-tests to revision e87f38097902e16348d4e17f4fe3bc2d0112bff1
This commit is contained in:
parent
2f8fa32e91
commit
db5631a086
381 changed files with 11610 additions and 4232 deletions
|
@ -0,0 +1,39 @@
|
|||
'use strict';
|
||||
|
||||
// =======================================
|
||||
//
|
||||
// Utility functions for testing timing
|
||||
//
|
||||
// =======================================
|
||||
|
||||
|
||||
// ------------------------------
|
||||
// Helper functions
|
||||
// ------------------------------
|
||||
|
||||
// Utility function to check that a subset of timing properties have their
|
||||
// default values.
|
||||
function assert_default_timing_except(effect, propertiesToSkip) {
|
||||
const defaults = {
|
||||
delay: 0,
|
||||
endDelay: 0,
|
||||
fill: 'auto',
|
||||
iterationStart: 0,
|
||||
iterations: 1,
|
||||
duration: 'auto',
|
||||
direction: 'normal',
|
||||
easing: 'linear',
|
||||
};
|
||||
|
||||
for (const prop of Object.keys(defaults)) {
|
||||
if (propertiesToSkip.includes(prop)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
assert_equals(
|
||||
effect.getTiming()[prop],
|
||||
defaults[prop],
|
||||
`${prop} parameter has default value:`
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue