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

Side by Side Diff: Source/web/tests/data/touch-action-tests.js

Issue 16507017: Initial touch-action main thread implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Don't add delay param to public API just yet Created 7 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 // For manual testing, disable compositor hit testing
2 document.addEventListener('touchstart', function() {});
3
4 /*
5 * Visualization of hit test locations for manual testing.
6 * Note that JS is not run as part of the unit test.
7 */
8 function addMarker(x, y)
9 {
10 const kMarkerSize = 6;
11 var marker = document.createElement('div');
12 marker.className = 'marker';
13 marker.style.top = (y - kMarkerSize/2) + "px";
14 marker.style.left = (x - kMarkerSize/2) + "px";
15 document.body.appendChild(marker);
16 }
17
18 window.addEventListener('load', function() {
19 var tests = document.querySelectorAll('[expected-action]');
20 for( var i = 0; i < tests.length; i++) {
21 var r = tests[i].getClientRects()[0];
22 addMarker(r.left, r.top);
23 addMarker(r.right - 1, r.bottom - 1);
24 addMarker(r.left + r.width / 2, r.top + r.height / 2);
25 }
26 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698