Index: PerformanceTests/CSS/HoverUpdate.html |
diff --git a/PerformanceTests/CSS/HoverUpdate.html b/PerformanceTests/CSS/HoverUpdate.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..72a45eb43f97ce31c072000aefb0d884f9960270 |
--- /dev/null |
+++ b/PerformanceTests/CSS/HoverUpdate.html |
@@ -0,0 +1,35 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+ <title>Measure hover update for a simple color change</title> |
+ <script src="../resources/runner.js"></script> |
+ <style type="text/css"> |
+ body { margin: 0 } |
+ .h { height: 50px; color: black; } |
+ .h:hover { color: white; } |
+ </style> |
+</head> |
+<body> |
+ <script> |
+ for (var i=0; i<100; i++) { |
+ document.write('<div>'); |
+ for (var j=0; j<100; j++) |
+ document.write('<div></div>'); |
+ document.write('</div>'); |
+ } |
+ </script> |
+ <div> |
+ <div class="h"></div><div class="h"></div> |
+ </div> |
+ <script type="text/javascript"> |
+ document.body.offsetTop; // Force layout. The mouse is not tracked before first layout. |
+ |
+ PerfTestRunner.measureRunsPerSecond({run:function() { |
+ eventSender.mouseMoveTo(10, 10); // Hover. |
+ document.body.offsetTop; // Update layout for hovered state. |
+ eventSender.mouseMoveTo(10, 70); // Hover. |
+ document.body.offsetTop; // Update layout for hovered state. |
+ }}); |
+ </script> |
+</body> |
+</html> |