| <html> |
| <head> |
| <script src="../../http/tests/inspector/inspector-test.js"></script> |
| <script src="../../http/tests/inspector/timeline-test.js"></script> |
| <script> |
| |
| function performActions() |
| { |
| var element = document.getElementById("animation"); |
| var requestId = window.requestAnimationFrame(animationFrameCallback, element); |
| function animationFrameCallback() |
| { |
| window.cancelAnimationFrame(requestId); |
| } |
| |
| if (window.testRunner) |
| testRunner.display(); |
| } |
| |
| function test() |
| { |
| InspectorTest.startTimeline(function() { |
| InspectorTest.evaluateInPage("performActions()"); |
| }); |
| |
| InspectorTest.waitForRecordType("CancelAnimationFrame", finish); |
| |
| function finish() |
| { |
| InspectorTest.printTimelineRecords("RequestAnimationFrame"); |
| InspectorTest.printTimelineRecords("FireAnimationFrame"); |
| InspectorTest.printTimelineRecords("CancelAnimationFrame"); |
| InspectorTest.completeTest(); |
| } |
| } |
| |
| if (!window.testRunner) |
| setTimeout(performActions, 2000); |
| |
| </script> |
| </head> |
| |
| <body onload="runTest()"> |
| <p> |
| Tests the Timeline events for Animation Frame feature |
| </p> |
| <div id="animation"> |
| |
| </div> |
| |
| </body> |
| </html> |