diff --git a/scroll-animations/progress-based-current-time.tenative.html b/scroll-animations/progress-based-current-time.tenative.html new file mode 100644 index 00000000000000..8a8ccfcff8b2ba --- /dev/null +++ b/scroll-animations/progress-based-current-time.tenative.html @@ -0,0 +1,501 @@ + + +ScrollTimeline current time algorithm + + + + + + + + + + diff --git a/scroll-animations/testcommon.js b/scroll-animations/testcommon.js index d9fc153887c5fc..9b3e82228fcdb3 100644 --- a/scroll-animations/testcommon.js +++ b/scroll-animations/testcommon.js @@ -55,3 +55,11 @@ function assert_approx_equals_or_null(actual, expected, tolerance, name){ assert_approx_equals(actual, expected, tolerance, name); } } + +// actual should be a CSSUnitValue and expected should be a double value 0-100 +function assert_percent_css_unit_value_approx_equals(actual, expected, tolerance, name){ + assert_true(actual instanceof CSSUnitValue, "'actual' must be of type CSSUnitValue"); + assert_equals(typeof expected, "number", "'expected' should be a number (0-100)"); + assert_equals(actual.unit, "percent", "'actual' unit type must be 'percent'"); + assert_approx_equals(actual.value, expected, tolerance, name); +} \ No newline at end of file