Bug 1515539 [wpt PR 14609] - WPT for passive document level wheel event listeners., a=testonly
authorSahel Sharify <sahel@chromium.org>
Thu, 31 Jan 2019 12:14:19 +0000
changeset 456882 8b224d3828d550c99b323464122c7a866734c4eb
parent 456881 faddcb80fe38ff75758ce1b3927abf9ab2990823
child 456883 c6a8d1fbea4cdc17fd4dd9ba4d30f5bd5c31c05e
push id35505
push usercsabou@mozilla.com
push dateTue, 05 Feb 2019 21:59:22 +0000
treeherdermozilla-central@476293c6700f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1515539, 14609, 626196, 1383323, 618297
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1515539 [wpt PR 14609] - WPT for passive document level wheel event listeners., a=testonly Automatic update from web-platform-tests WPT for passive document level wheel event listeners. This cl adds a WPT test for passive document level wheel event listeners intervention. It also adds a message to let developers know when they call preventDefault on wheel events that are non-cancelable due to the intervention. Bug: 626196 Change-Id: I7f51ff4560de7ffa7bf89cab9e5332daa6cb70c0 Reviewed-on: https://chromium-review.googlesource.com/c/1383323 Reviewed-by: Dave Tapuska <dtapuska@chromium.org> Reviewed-by: Navid Zolghadr <nzolghadr@chromium.org> Commit-Queue: Sahel Sharify <sahel@chromium.org> Cr-Commit-Position: refs/heads/master@{#618297} -- wpt-commits: a2448c2392587668a9b9f8ec4e3d0dec76640f25 wpt-pr: 14609
testing/web-platform/tests/dom/events/document-level-wheel-event-listener-passive-by-default-manual.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/dom/events/document-level-wheel-event-listener-passive-by-default-manual.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<title>Default passive document level wheel event listener manual test</title>
+<link rel="help" href="https://github.com/WICG/interventions/issues/64">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<div>This is a manual test since there is no way to synthesize wheel events.
+Scroll by wheel in the middle of the page to run the test.</div>
+<script>
+function testWheelCancelable(test) {
+  document.addEventListener("wheel", test.step_func(event => {
+    assert_false(event.cancelable, "Wheel event must be non-cancelable.");
+    test.done();
+  }));
+}
+async_test(t => { testWheelCancelable(t); }, "Wheel events are " +
+    "non-cancelable since the event listener is treated as passive");
+</script>