Index: LayoutTests/perf/compositor-touch-hit-rects.html |
diff --git a/LayoutTests/perf/compositor-touch-hit-rects.html b/LayoutTests/perf/compositor-touch-hit-rects.html |
deleted file mode 100644 |
index 2fb1bacf0710469005ad4a393ce0ad2cb181d3b4..0000000000000000000000000000000000000000 |
--- a/LayoutTests/perf/compositor-touch-hit-rects.html |
+++ /dev/null |
@@ -1,121 +0,0 @@ |
-<html> |
-<head> |
-<style> |
-#test { |
- height: 0px; |
-} |
-.child { |
- height: 5px; |
- width: 5px; |
- margin: 5px; |
-} |
-.layer { |
- transform: translateZ(0); |
-} |
-</style> |
-</head> |
-<body> |
-<div id='test'> |
-</div> |
-<script src="../resources/magnitude-perf.js"></script> |
-<script> |
- |
-function log(msg) |
-{ |
- Magnitude._log(msg); |
-} |
- |
-var testNode; |
- |
-function setupFunction(magnitude, className) |
-{ |
- testNode = document.getElementById('test'); |
- testNode.innerHTML = ''; |
- for(var i = 0; i < magnitude; i++) { |
- var child = document.createElement('div'); |
- child.className = className; |
- testNode.appendChild(child); |
- } |
- |
- // Force any pending full layout (since hit rect computation will be skipped |
- // when there is a layout pending). It's important that layout isn't dirtied |
- // after this before the tests run, or we'll get low linear times for everything. |
- document.body.getBoundingClientRect(); |
- |
-} |
- |
-// Test 1 tests that rect calculation is linear in the number of rects in a layer. |
- |
-function setupFunction1(magnitude) |
-{ |
- setupFunction(magnitude, 'child'); |
-} |
- |
-// Test 2 tests that rect calculation is linear in the number of layers. |
- |
-function setupFunction2(magnitude) |
-{ |
- setupFunction(magnitude, 'child layer'); |
-} |
- |
-function touchHandler(event) |
-{ |
-} |
- |
-function test(magnitude) |
-{ |
- // Adding or removing a touch handler will force recomputation of the |
- // touch hit rects. Note layout also forces recomputation and is the more |
- // relevant scenario, but is too noisy to use for a perf test. |
- testNode.addEventListener('touchstart', touchHandler); |
- |
- // Note that if the times aren't coming out as expected, you should check here that the expected |
- // touch hit rects were generated by using window.internals.touchEventTargetLayerRects(document). |
- // For example, run in content_shell with --expose-internals-for-testing. |
- testNode.removeEventListener('touchstart', touchHandler); |
-} |
- |
-Magnitude.description('Tests that compositor touch hit rect calculation is ' + |
- 'linear in the number of rects and in the number of layers.'); |
- |
-// Wait for first layout. |
-document.body.getBoundingClientRect(); |
- |
-function main() |
-{ |
- // Verify that compositor touch hit testing is properly enabled. |
- if (!window.internals) { |
- log("WARNING - missing windows.internals, can't verify hit testing is enabled."); |
- return; |
- } |
- var testNode = document.getElementById('test'); |
- r = testNode.getBoundingClientRect(); |
- |
- testNode.addEventListener('touchstart', touchHandler); |
- var rects = window.internals.touchEventTargetLayerRects(document); |
- if (!rects) { |
- log("FAIL - no hit test rects exist, is compositing enabled?"); |
- return; |
- } |
- if (!rects.length) { |
- log("FAIL - no hit test rects found, is ScrollingCoordinator::touchHitTestingEnabled false?"); |
- return; |
- } |
- testNode.removeEventListener('touchstart', touchHandler); |
- |
- |
- Magnitude.trim = 1; |
- Magnitude.tolerance = 0.80; |
- |
- Magnitude.initialExponent = 7; |
- Magnitude.numPoints = 5; |
- Magnitude.run(setupFunction1, test, Magnitude.LINEAR); |
- |
- Magnitude.initialExponent = 4; |
- Magnitude.numPoints = 5; |
- Magnitude.run(setupFunction2, test, Magnitude.LINEAR); |
-} |
-main(); |
- |
-</script> |
-</body> |