OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <script src="../../http/tests/inspector/inspector-test.js"></script> | |
4 <script src="../../http/tests/inspector/timeline-test.js"></script> | |
5 <script> | |
6 | |
7 function performActions(callback) | |
8 { | |
9 var element = document.getElementById("animation"); | |
10 var requestId = window.requestAnimationFrame(animationFrameCallback, element
); | |
11 function animationFrameCallback() | |
12 { | |
13 window.cancelAnimationFrame(requestId); | |
14 callback(); | |
15 } | |
16 } | |
17 | |
18 function test() | |
19 { | |
20 InspectorTest.invokeAsyncWithTimeline("performActions", finish); | |
21 | |
22 function finish() | |
23 { | |
24 InspectorTest.printTimelineRecords("RequestAnimationFrame"); | |
25 InspectorTest.printTimelineRecords("FireAnimationFrame"); | |
26 InspectorTest.printTimelineRecords("CancelAnimationFrame"); | |
27 InspectorTest.completeTest(); | |
28 } | |
29 } | |
30 | |
31 if (!window.testRunner) | |
32 setTimeout(performActions, 2000); | |
33 | |
34 </script> | |
35 </head> | |
36 | |
37 <body onload="runTest()"> | |
38 <p> | |
39 Tests the Timeline events for Animation Frame feature | |
40 </p> | |
41 <div id="animation"> | |
42 | |
43 </div> | |
44 | |
45 </body> | |
46 </html> | |
OLD | NEW |