OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <title>Measure hover update for a simple color change</title> |
| 5 <script src="../resources/runner.js"></script> |
| 6 <style type="text/css"> |
| 7 body { margin: 0 } |
| 8 .h { height: 50px; color: black; } |
| 9 .h:hover { color: white; } |
| 10 </style> |
| 11 </head> |
| 12 <body> |
| 13 <script> |
| 14 for (var i=0; i<100; i++) { |
| 15 document.write('<div>'); |
| 16 for (var j=0; j<100; j++) |
| 17 document.write('<div></div>'); |
| 18 document.write('</div>'); |
| 19 } |
| 20 </script> |
| 21 <div> |
| 22 <div class="h"></div><div class="h"></div> |
| 23 </div> |
| 24 <script type="text/javascript"> |
| 25 document.body.offsetTop; // Force layout. The mouse is not tracked befor
e first layout. |
| 26 |
| 27 PerfTestRunner.measureRunsPerSecond({run:function() { |
| 28 eventSender.mouseMoveTo(10, 10); // Hover. |
| 29 document.body.offsetTop; // Update layout for hovered state. |
| 30 eventSender.mouseMoveTo(10, 70); // Hover. |
| 31 document.body.offsetTop; // Update layout for hovered state. |
| 32 }}); |
| 33 </script> |
| 34 </body> |
| 35 </html> |
OLD | NEW |