Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 5f9651f

Browse files
zcorpanmoz-wptsync-bot
authored andcommitted
Bug 1774553 [wpt PR 34464] - DOM: Test {mouse,}wheel and touch{move,start} events are non-cancelable when there are no non-passive event listeners, a=testonly
Automatic update from web-platform-tests DOM: Events are non-cancelable when no non-passive listeners Test that `wheel`, `mousewheel`, `touchstart`, `touchmove` events are not cancelable when there are no non-passive event listeners, and cancelable when there are non-passive event listeners. Follows https://w3c.github.io/touch-events/#cancelability and https://w3c.github.io/uievents/#cancelability-of-wheel-events The `mousewheel` event is not yet defined: w3c/uievents#331 -- wpt-commits: 95d4bd97e123a54e8c7171b639d3e4fab89e68be wpt-pr: 34464
1 parent 086c9a9 commit 5f9651f

File tree

46 files changed

+1059
-124
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1059
-124
lines changed

testing/web-platform/tests/dom/events/document-level-touchmove-event-listener-passive-by-default.tentative.html

Lines changed: 0 additions & 73 deletions
This file was deleted.

testing/web-platform/tests/dom/events/document-level-wheel-event-listener-passive-by-default.tentative.html

Lines changed: 0 additions & 51 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE html>
2+
<title>non-passive mousewheel event listener on body</title>
3+
<link rel="help" href="https://w3c.github.io/uievents/#cancelability-of-wheel-events">
4+
<link rel="help" href="https://github.com/w3c/uievents/issues/331">
5+
<script src="/resources/testharness.js"></script>
6+
<script src="/resources/testharnessreport.js"></script>
7+
<script src="/resources/testdriver.js"></script>
8+
<script src="/resources/testdriver-actions.js"></script>
9+
<script src="/resources/testdriver-vendor.js"></script>
10+
<script src="resources/wait-for.js"></script>
11+
<script src="resources/scrolling.js"></script>
12+
<div class=remove-on-cleanup style="height: 200vh"></div>
13+
<script>
14+
runTest({
15+
target: document.body,
16+
eventName: 'mousewheel',
17+
passive: false,
18+
expectCancelable: true,
19+
});
20+
</script>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!DOCTYPE html>
2+
<title>non-passive mousewheel event listener on div</title>
3+
<link rel="help" href="https://w3c.github.io/uievents/#cancelability-of-wheel-events">
4+
<link rel="help" href="https://github.com/w3c/uievents/issues/331">
5+
<script src="/resources/testharness.js"></script>
6+
<script src="/resources/testharnessreport.js"></script>
7+
<script src="/resources/testdriver.js"></script>
8+
<script src="/resources/testdriver-actions.js"></script>
9+
<script src="/resources/testdriver-vendor.js"></script>
10+
<script src="resources/wait-for.js"></script>
11+
<script src="resources/scrolling.js"></script>
12+
<style>
13+
html, body {
14+
overflow: hidden;
15+
margin: 0;
16+
}
17+
#div {
18+
position: fixed;
19+
top: 0;
20+
right: 0;
21+
bottom: 0;
22+
left: 0;
23+
overflow: scroll;
24+
}
25+
</style>
26+
<div class=remove-on-cleanup id=div>
27+
<div style="height: 200vh"></div>
28+
</div>
29+
<script>
30+
runTest({
31+
target: document.getElementById('div'),
32+
eventName: 'mousewheel',
33+
passive: false,
34+
expectCancelable: true,
35+
});
36+
</script>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE html>
2+
<title>non-passive mousewheel event listener on document</title>
3+
<link rel="help" href="https://w3c.github.io/uievents/#cancelability-of-wheel-events">
4+
<link rel="help" href="https://github.com/w3c/uievents/issues/331">
5+
<script src="/resources/testharness.js"></script>
6+
<script src="/resources/testharnessreport.js"></script>
7+
<script src="/resources/testdriver.js"></script>
8+
<script src="/resources/testdriver-actions.js"></script>
9+
<script src="/resources/testdriver-vendor.js"></script>
10+
<script src="resources/wait-for.js"></script>
11+
<script src="resources/scrolling.js"></script>
12+
<div class=remove-on-cleanup style="height: 200vh"></div>
13+
<script>
14+
runTest({
15+
target: document,
16+
eventName: 'mousewheel',
17+
passive: false,
18+
expectCancelable: true,
19+
});
20+
</script>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE html>
2+
<title>non-passive mousewheel event listener on root</title>
3+
<link rel="help" href="https://w3c.github.io/uievents/#cancelability-of-wheel-events">
4+
<link rel="help" href="https://github.com/w3c/uievents/issues/331">
5+
<script src="/resources/testharness.js"></script>
6+
<script src="/resources/testharnessreport.js"></script>
7+
<script src="/resources/testdriver.js"></script>
8+
<script src="/resources/testdriver-actions.js"></script>
9+
<script src="/resources/testdriver-vendor.js"></script>
10+
<script src="resources/wait-for.js"></script>
11+
<script src="resources/scrolling.js"></script>
12+
<div class=remove-on-cleanup style="height: 200vh"></div>
13+
<script>
14+
runTest({
15+
target: document.documentElement,
16+
eventName: 'mousewheel',
17+
passive: false,
18+
expectCancelable: true,
19+
});
20+
</script>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE html>
2+
<title>non-passive mousewheel event listener on window</title>
3+
<link rel="help" href="https://w3c.github.io/uievents/#cancelability-of-wheel-events">
4+
<link rel="help" href="https://github.com/w3c/uievents/issues/331">
5+
<script src="/resources/testharness.js"></script>
6+
<script src="/resources/testharnessreport.js"></script>
7+
<script src="/resources/testdriver.js"></script>
8+
<script src="/resources/testdriver-actions.js"></script>
9+
<script src="/resources/testdriver-vendor.js"></script>
10+
<script src="resources/wait-for.js"></script>
11+
<script src="resources/scrolling.js"></script>
12+
<div class=remove-on-cleanup style="height: 200vh"></div>
13+
<script>
14+
runTest({
15+
target: window,
16+
eventName: 'mousewheel',
17+
passive: false,
18+
expectCancelable: true,
19+
});
20+
</script>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE html>
2+
<title>non-passive touchmove event listener on body</title>
3+
<link rel="help" href="https://w3c.github.io/touch-events/#cancelability">
4+
<script src="/resources/testharness.js"></script>
5+
<script src="/resources/testharnessreport.js"></script>
6+
<script src="/resources/testdriver.js"></script>
7+
<script src="/resources/testdriver-actions.js"></script>
8+
<script src="/resources/testdriver-vendor.js"></script>
9+
<script src="resources/wait-for.js"></script>
10+
<script src="resources/touching.js"></script>
11+
<style>
12+
#touchDiv {
13+
width: 100px;
14+
height: 100px;
15+
}
16+
</style>
17+
<div id="touchDiv"></div>
18+
<script>
19+
runTest({
20+
target: document.body,
21+
eventName: 'touchmove',
22+
passive: false,
23+
expectCancelable: true,
24+
});
25+
</script>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE html>
2+
<title>non-passive touchmove event listener on div</title>
3+
<link rel="help" href="https://w3c.github.io/touch-events/#cancelability">
4+
<script src="/resources/testharness.js"></script>
5+
<script src="/resources/testharnessreport.js"></script>
6+
<script src="/resources/testdriver.js"></script>
7+
<script src="/resources/testdriver-actions.js"></script>
8+
<script src="/resources/testdriver-vendor.js"></script>
9+
<script src="resources/wait-for.js"></script>
10+
<script src="resources/touching.js"></script>
11+
<style>
12+
#touchDiv {
13+
width: 100px;
14+
height: 100px;
15+
}
16+
</style>
17+
<div id="touchDiv"></div>
18+
<script>
19+
runTest({
20+
target: document.getElementById('touchDiv'),
21+
eventName: 'touchmove',
22+
passive: false,
23+
expectCancelable: true,
24+
});
25+
</script>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE html>
2+
<title>non-passive touchmove event listener on document</title>
3+
<link rel="help" href="https://w3c.github.io/touch-events/#cancelability">
4+
<script src="/resources/testharness.js"></script>
5+
<script src="/resources/testharnessreport.js"></script>
6+
<script src="/resources/testdriver.js"></script>
7+
<script src="/resources/testdriver-actions.js"></script>
8+
<script src="/resources/testdriver-vendor.js"></script>
9+
<script src="resources/wait-for.js"></script>
10+
<script src="resources/touching.js"></script>
11+
<style>
12+
#touchDiv {
13+
width: 100px;
14+
height: 100px;
15+
}
16+
</style>
17+
<div id="touchDiv"></div>
18+
<script>
19+
runTest({
20+
target: document,
21+
eventName: 'touchmove',
22+
passive: false,
23+
expectCancelable: true,
24+
});
25+
</script>

0 commit comments

Comments
 (0)