OLD | NEW |
(Empty) | |
| 1 <!-- |
| 2 Licensed under the Apache License, Version 2.0 (the "License"); |
| 3 you may not use this file except in compliance with the License. |
| 4 You may obtain a copy of the License at |
| 5 |
| 6 http://www.apache.org/licenses/LICENSE-2.0 |
| 7 |
| 8 Unless required by applicable law or agreed to in writing, software |
| 9 distributed under the License is distributed on an "AS IS" BASIS, |
| 10 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 See the License for the specific language governing permissions and |
| 12 limitations under the License. |
| 13 --> |
| 14 |
| 15 <!DOCTYPE html><meta charset="UTF-8"> |
| 16 <body></body> |
| 17 <script src="../bootstrap.js" nochecks></script> |
| 18 <script> |
| 19 "use strict"; |
| 20 |
| 21 var timelineOne = new Timeline(_WebAnimationsTestingUtilities._constructorToken)
; |
| 22 timelineOne._startTime = 3; |
| 23 var timelineTwo = new Timeline(_WebAnimationsTestingUtilities._constructorToken)
; |
| 24 timelineTwo._startTime = 42; |
| 25 |
| 26 test(function() { |
| 27 var startTimeOne = timelineOne._startTime; |
| 28 var startTimeTwo = timelineTwo._startTime; |
| 29 var otherTime = timelineTwo.currentTime; |
| 30 var timelineOneTime = timelineOne.toTimelineTime(otherTime, timelineTwo); |
| 31 var timelineOneTimeExpected = otherTime + startTimeTwo - startTimeOne; |
| 32 |
| 33 assert_approx_equals(timelineOneTime, timelineOneTimeExpected, 0.00001, 'Unexp
ected result with fake start times.'); |
| 34 }, 'toTimelineTime with fake start times'); |
| 35 |
| 36 </script> |
| 37 |
OLD | NEW |