| Index: third_party/WebKit/LayoutTests/fast/events/touch/touch-action-preventDefault.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/events/touch/touch-action-preventDefault.html b/third_party/WebKit/LayoutTests/fast/events/touch/touch-action-preventDefault.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..142e402d39ed3b0494e451dd40fc893eb8b89971
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/fast/events/touch/touch-action-preventDefault.html
|
| @@ -0,0 +1,28 @@
|
| +<!DOCTYPE html>
|
| +<script src='../../../resources/testharness.js'></script>
|
| +<script src='../../../resources/testharnessreport.js'></script>
|
| +<style>
|
| + #first {width: 100px; height: 50px; }
|
| + #second {width: 100px; height: 50px; touch-action: none;}
|
| +</style>
|
| +<body>
|
| + <div id="first"></div>
|
| + <div id="second"></div>
|
| +<script>
|
| +test(function() {
|
| + var handler = (e) => {e.preventDefault();};
|
| + window.addEventListener('touchstart', handler);
|
| + eventSender.addTouchPoint(15, 15);
|
| + eventSender.touchStart();
|
| + eventSender.clearTouchPoints();
|
| + window.removeEventListener('touchstart', handler);
|
| +}, 'Forced passive event listener');
|
| +test(function() {
|
| + var handler = (e) => {e.preventDefault();};
|
| + window.addEventListener('touchstart', handler);
|
| + eventSender.addTouchPoint(15, 70);
|
| + eventSender.touchStart();
|
| + window.removeEventListener('touchstart', handler);
|
| +}, 'Forced passive event listener with touch-action');
|
| +</script>
|
| +</body>
|
|
|