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

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..0cf2377a563f32f1c8e712ef5e40049e1f82c26d 100644
--- a/LayoutTests/perf/compositor-touch-hit-rects.html
+++ b/LayoutTests/perf/compositor-touch-hit-rects.html
@@ -15,8 +15,6 @@
</style>
</head>
<body>
-<pre id='log'>
-</pre>
<div id='test'>
</div>
<script src="../resources/magnitude-perf.js"></script>
@@ -24,7 +22,7 @@
function log(msg)
{
- document.getElementById('log').innerText += msg + '\n';
+ Magnitude._log(msg);
}
var testNode;
@@ -83,8 +81,13 @@ 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) {
+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();
@@ -96,23 +99,23 @@ if (window.internals) {
}
if (!rects.length) {
log("FAIL - no hit test rects found, is ScrollingCoordinator::touchHitTestingEnabled false?");
+ return;
}
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.trim = 1;
+ Magnitude.tolerance = 0.80;
-Magnitude.initialExponent = 7;
-Magnitude.numPoints = 5;
-Magnitude.run(setupFunction1, 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);
+ 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