| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <meta charset=utf-8> |
| 3 <title>Document timeline is increasing</title> |
| 4 <link rel="help" href="http://w3c.github.io/web-animations/#the-documents-defaul
t-timeline"> |
| 2 <script src="../resources/testharness.js"></script> | 5 <script src="../resources/testharness.js"></script> |
| 3 <script src="../resources/testharnessreport.js"></script> | 6 <script src="../resources/testharnessreport.js"></script> |
| 4 | 7 |
| 5 <script> | 8 <script> |
| 6 test(function() { | 9 test(function() { |
| 7 var startTime = document.timeline.currentTime; | 10 var startTime = document.timeline.currentTime; |
| 8 assert_greater_than_equal(startTime, 0); | 11 assert_greater_than_equal(startTime, 0); |
| 9 var start = performance.now(); | 12 var start = performance.now(); |
| 10 while (performance.now() < start + 250) | 13 while (performance.now() < start + 250) |
| 11 /* wait */; | 14 /* wait */; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 var timeoutTest = async_test('document.timeline.currentTime time should use th
e same reference as performance.now()'); | 51 var timeoutTest = async_test('document.timeline.currentTime time should use th
e same reference as performance.now()'); |
| 49 | 52 |
| 50 setTimeout(function() { | 53 setTimeout(function() { |
| 51 timeoutTest.step(function() { | 54 timeoutTest.step(function() { |
| 52 assert_less_than(Math.abs(document.timeline.currentTime - performance.now(
)), 1000); | 55 assert_less_than(Math.abs(document.timeline.currentTime - performance.now(
)), 1000); |
| 53 }); | 56 }); |
| 54 timeoutTest.done(); | 57 timeoutTest.done(); |
| 55 }, 0); | 58 }, 0); |
| 56 })(); | 59 })(); |
| 57 </script> | 60 </script> |
| OLD | NEW |