| <!DOCTYPE html> |
| <script src="../resources/testharness.js"></script> |
| <script src="../resources/testharnessreport.js"></script> |
| <script> |
| 'use strict'; |
| // From UseCounter.h |
| var WebAnimationsEasingAsFunctionLinear = 1295; |
| var WebAnimationsEasingAsFunctionOther = 1296; |
| |
| test(() => { |
| assert_throws( |
| {name: 'TypeError'}, |
| function() { document.documentElement.animate([], { easing: 'function(x, y){return 0.3}' }) }); |
| assert_false(internals.isUseCounted(document, WebAnimationsEasingAsFunctionLinear)); |
| assert_true(internals.isUseCounted(document, WebAnimationsEasingAsFunctionOther)); |
| }, 'Arbitrary functions for easing are counted in WebAnimationsEasingAsFunctionOther.'); |
| </script> |