OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <title>Tests that animation works, if begin is set by js.</title> | |
fs
2015/05/12 10:35:48
Try to make this describe the test better (it's ve
Shanmuga Pandi
2015/05/12 11:03:10
Done.
| |
3 <script src=../../resources/testharness.js></script> | |
4 <script src=../../resources/testharnessreport.js></script> | |
5 <svg> | |
6 <rect id="rect" width="100" height="100"> | |
7 <set id="anim" | |
8 begin="indefinite" | |
9 dur="0.05s" | |
10 attributeName="width" | |
11 to="50" | |
12 fill="freeze"/> | |
13 </rect> | |
14 </svg> | |
15 <script> | |
16 document.getElementById("anim").setAttribute("begin","rect.click"); | |
17 if (window.eventSender) { | |
18 eventSender.mouseMoveTo(50, 50); | |
19 eventSender.mouseDown(); | |
20 eventSender.mouseUp(); | |
21 } | |
22 | |
23 if (window.testRunner) { | |
24 testRunner.displayAsyncThen(function() { | |
25 dumpResult(); | |
26 }); | |
27 } | |
28 | |
29 function dumpResult() | |
30 { | |
31 var width = document.getElementById("rect").getAttribute("width"); | |
32 test(function() { | |
33 assert_not_equals(width, "100"); | |
fs
2015/05/12 10:35:48
This is very atypical use of testharness I'd say.
Shanmuga Pandi
2015/05/12 11:03:10
Changed according to your suggestion. Thank you.
| |
34 }, document.title); | |
35 | |
36 if (window.testRunner) | |
37 testRunner.notifyDone(); | |
38 } | |
39 | |
40 if (window.testRunner) { | |
41 testRunner.dumpAsText(); | |
42 testRunner.waitUntilDone(); | |
43 } | |
44 </script> | |
OLD | NEW |