| <!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){return x}' }) }); |
| assert_false(internals.isUseCounted(document, WebAnimationsEasingAsFunctionLinear)); |
| assert_true(internals.isUseCounted(document, WebAnimationsEasingAsFunctionOther)); |
| }, 'Any linear function for easing other than "function (a){return a}" is counted in WebAnimationsEasingAsFunctionOther.'); |
| </script> |