| <!DOCTYPE html> |
| <title>pause/setCurrentTime/unpause before timeline started gives correct presentation time</title> |
| <script src="../../resources/testharness.js"></script> |
| <script src="../../resources/testharnessreport.js"></script> |
| <svg> |
| <rect width="100" height="100"> |
| <animate attributeName="x" from="0" to="200" begin="2" dur="20"/> |
| </rect> |
| </svg> |
| <script> |
| async_test(function(t) { |
| var target = document.querySelector('svg'); |
| target.pauseAnimations(); |
| target.setCurrentTime(3); |
| target.unpauseAnimations(); |
| window.onload = function() { |
| setTimeout(t.step_func_done(function() { |
| assert_greater_than_equal(target.getCurrentTime(), 3); |
| }), 0); |
| }; |
| }); |
| </script> |