Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Unified Diff: LayoutTests/perf/compositor-touch-hit-rects.html

Issue 540613004: Fix compositor-touch-hit-rects.html (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
index aac1f297f6eb47d5de2971ebc3a7783d0d660a29..95a9c63092cfa5c75f9f25b266c8034e5917e6fd 100644
--- a/LayoutTests/perf/compositor-touch-hit-rects.html
+++ b/LayoutTests/perf/compositor-touch-hit-rects.html
@@ -83,36 +83,39 @@ Magnitude.description('Tests that compositor touch hit rect calculation is ' +
// Wait for first layout.
document.body.getBoundingClientRect();
-// Verify that compositor touch hit testing is properly enabled.
-if (window.internals) {
- 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?");
+function main()
+{
+ // Verify that compositor touch hit testing is properly enabled.
+ if (window.internals) {
Rick Byers 2014/09/06 00:17:29 If you're going to wrap this all in a function, th
eustas 2014/09/08 05:38:51 Done. Also fixed log function.
+ 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?");
+ }
+ testNode.removeEventListener('touchstart', touchHandler);
+ } else {
+ log("WARNING - missing windows.internals, can't verify hit testing is enabled.");
}
- testNode.removeEventListener('touchstart', touchHandler);
-} else {
- log("WARNING - missing windows.internals, can't verify hit testing is enabled.");
-}
-
-Magnitude.trim = 1;
-Magnitude.tolerance = 0.80;
-Magnitude.initialExponent = 7;
-Magnitude.numPoints = 5;
-Magnitude.run(setupFunction1, test, Magnitude.LINEAR);
+ Magnitude.trim = 1;
+ Magnitude.tolerance = 0.80;
-Magnitude.initialExponent = 4;
-Magnitude.numPoints = 5;
-Magnitude.run(setupFunction2, test, Magnitude.LINEAR);
+ 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>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698