OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <svg height="100" width="200"> | |
3 <rect x="100" width="100" height="100" fill="#ff0000"></rect> | |
4 <rect width="100" height="100" fill="#008000"> | |
5 <animateTransform attributeName="transform" type="translate" | |
6 from="50 0" to="100 0" dur="0.1s" id="right" begin="left.e nd" onend="checkResult()" fill="freeze"/> | |
7 <animateTransform attributeName="transform" type="translate" | |
8 from="0 0" to="50 0" dur="0.1s" id="left" begin="0s; right .end+100s"/> | |
9 </rect> | |
10 </svg> | |
11 <script> | |
12 if (window.testRunner) { | |
13 testRunner.dumpAsText(); | |
14 testRunner.waitUntilDone(); | |
15 } | |
16 function checkResult() { | |
17 document.querySelector('svg').pauseAnimations(); | |
18 window.clearTimeout(timeoutTimer); | |
19 var rect = document.querySelector('rect + rect'); | |
20 var rectTransformList = rect.transform.animVal; | |
21 if (rectTransformList.numberOfItems == 1 && | |
22 rectTransformList.getItem(0).matrix.e === 100) { | |
23 result = 'PASS'; | |
24 } else { | |
25 result = 'FAIL'; | |
26 } | |
27 document.body.appendChild(document.createTextNode(result)); | |
28 if (window.testRunner) | |
29 testRunner.notifyDone(); | |
30 } | |
31 var timeoutTimer = setTimeout(checkResult, 1000); | |
pdr.
2014/02/25 17:47:39
Is this needed? The test infrastructure is setup t
fs
2014/02/25 18:02:29
No, it shouldn't be strictly needed. I'll drop it
| |
32 </script> | |
OLD | NEW |