OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <title>SVG Web Animations should be responsive to changes in the underlying valu
e</title> | 2 <title>SVG Web Animations should be responsive to changes in the underlying valu
e</title> |
3 <script src="../resources/testharness.js"></script> | 3 <script src="../../resources/testharness.js"></script> |
4 <script src="../resources/testharnessreport.js"></script> | 4 <script src="../../resources/testharnessreport.js"></script> |
5 <script> | 5 <script> |
6 // offset has a primitive animVal type. | 6 // offset has a primitive animVal type. |
7 function createOffsetTestTarget() { | 7 function createOffsetTestTarget() { |
8 var target = document.createElementNS('http://www.w3.org/2000/svg', 'stop'); | 8 var target = document.createElementNS('http://www.w3.org/2000/svg', 'stop'); |
9 target.setAttribute('offset', '0'); | 9 target.setAttribute('offset', '0'); |
10 var animation = target.animate({'svg-offset': '1'}, 1); | 10 var animation = target.animate({'svg-offset': '1'}, 1); |
11 animation.pause(); | 11 animation.pause(); |
12 animation.currentTime = 0.5; | 12 animation.currentTime = 0.5; |
13 assert_equals(target.getAttribute('offset'), '0.5', 'Initial getAttribute()'); | 13 assert_equals(target.getAttribute('offset'), '0.5', 'Initial getAttribute()'); |
14 assert_equals(target.offset.animVal, 0.5, 'Initial get animVal'); | 14 assert_equals(target.offset.animVal, 0.5, 'Initial get animVal'); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 var target = createViewBoxTestTarget(); | 67 var target = createViewBoxTestTarget(); |
68 var animVal = target.viewBox.animVal; | 68 var animVal = target.viewBox.animVal; |
69 var baseVal = target.viewBox.baseVal; | 69 var baseVal = target.viewBox.baseVal; |
70 baseVal.x = 0.5; | 70 baseVal.x = 0.5; |
71 baseVal.y = 0.5; | 71 baseVal.y = 0.5; |
72 baseVal.width = 0.5; | 72 baseVal.width = 0.5; |
73 baseVal.height = 0.5; | 73 baseVal.height = 0.5; |
74 assert_equals(serializeRect(animVal), '0.75 0.75 0.75 0.75'); | 74 assert_equals(serializeRect(animVal), '0.75 0.75 0.75 0.75'); |
75 }, document.title + ': set baseVal -> read tear-off animVal'); | 75 }, document.title + ': set baseVal -> read tear-off animVal'); |
76 </script> | 76 </script> |
OLD | NEW |