| Index: Source/web/tests/data/touch-action-tests.js
|
| diff --git a/Source/web/tests/data/touch-action-tests.js b/Source/web/tests/data/touch-action-tests.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..38ac3015d072be8d831c9c870c7af733991ba734
|
| --- /dev/null
|
| +++ b/Source/web/tests/data/touch-action-tests.js
|
| @@ -0,0 +1,26 @@
|
| +// For manual testing, disable compositor hit testing
|
| +document.addEventListener('touchstart', function() {});
|
| +
|
| +/*
|
| + * Visualization of hit test locations for manual testing.
|
| + * Note that JS is not run as part of the unit test.
|
| + */
|
| +function addMarker(x, y)
|
| +{
|
| + const kMarkerSize = 6;
|
| + var marker = document.createElement('div');
|
| + marker.className = 'marker';
|
| + marker.style.top = (y - kMarkerSize/2) + "px";
|
| + marker.style.left = (x - kMarkerSize/2) + "px";
|
| + document.body.appendChild(marker);
|
| +}
|
| +
|
| +window.addEventListener('load', function() {
|
| + var tests = document.querySelectorAll('[expected-action]');
|
| + for( var i = 0; i < tests.length; i++) {
|
| + var r = tests[i].getClientRects()[0];
|
| + addMarker(r.left, r.top);
|
| + addMarker(r.right - 1, r.bottom - 1);
|
| + addMarker(r.left + r.width / 2, r.top + r.height / 2);
|
| + }
|
| +});
|
|
|