OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto
r-protocol-test.js"></script> |
| 4 <script> |
| 5 function test() |
| 6 { |
| 7 InspectorTest.sendCommandOrDie("Animation.enable", {}); |
| 8 |
| 9 InspectorTest.sendCommandOrDie("Animation.getPlaybackRate", {}, logPlaybackR
ate.bind(null, setPlaybackRate)); |
| 10 |
| 11 function logPlaybackRate(callback, result) |
| 12 { |
| 13 InspectorTest.log(result.playbackRate); |
| 14 callback(); |
| 15 } |
| 16 |
| 17 function setPlaybackRate() |
| 18 { |
| 19 InspectorTest.sendCommandOrDie("Animation.setPlaybackRate", { playbackRa
te: 0.1 }); |
| 20 InspectorTest.sendCommandOrDie("Animation.getPlaybackRate", {}, logPlayb
ackRate.bind(null, disable)); |
| 21 } |
| 22 |
| 23 function disable() |
| 24 { |
| 25 InspectorTest.sendCommandOrDie("Animation.disable", {}); |
| 26 InspectorTest.sendCommandOrDie("Animation.getPlaybackRate", {}, logPlayb
ackRate.bind(null, enable)); |
| 27 } |
| 28 |
| 29 function enable() |
| 30 { |
| 31 InspectorTest.sendCommandOrDie("Animation.enable", {}); |
| 32 InspectorTest.sendCommandOrDie("Animation.getPlaybackRate", {}, logPlayb
ackRate.bind(null, InspectorTest.completeTest.bind(InspectorTest))); |
| 33 } |
| 34 |
| 35 } |
| 36 |
| 37 </script> |
| 38 </head> |
| 39 <body onload="runTest()"> |
| 40 <div id="node" style="background-color: red; height: 100px"></div> |
| 41 </body> |
| 42 </html> |
OLD | NEW |