Bug 1450009 [wpt PR 10243] - Add wpt test for back/forward mouse buttons., a=testonly
authorDave Tapuska <dtapuska@chromium.org>
Mon, 09 Apr 2018 18:33:32 +0000
changeset 467230 febe2a9b5189fcafcddd96ad10f865cea1b48859
parent 467229 82a3b68b0a585db261b7bf4ddc8516616a776303
child 467231 b9ec8ae030bea685aeca96d4a375dfdfdd2c1420
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1450009, 10243, 680741, 986508, 546857
milestone61.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 1450009 [wpt PR 10243] - Add wpt test for back/forward mouse buttons., a=testonly Automatic update from web-platform-testsAdd wpt test for back/forward mouse buttons. Test that back and forward mouseup events are received and can be preventDefaulted. BUG=680741 Change-Id: I381a3c3dacc344ae4f49c8a35cdcc0ef83907917 Reviewed-on: https://chromium-review.googlesource.com/986508 Reviewed-by: Navid Zolghadr <nzolghadr@chromium.org> Commit-Queue: Dave Tapuska <dtapuska@chromium.org> Cr-Commit-Position: refs/heads/master@{#546857} wpt-commits: 68f87b7492febebdc9911028e562b8bc4ea0c35f wpt-pr: 10243 wpt-commits: 68f87b7492febebdc9911028e562b8bc4ea0c35f wpt-pr: 10243
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/uievents/mouse/mouse_buttons_back_forward-manual.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -18800,16 +18800,22 @@
     ]
    ],
    "uievents/mouse/layout_change_should_fire_mouseover-manual.html": [
     [
      "/uievents/mouse/layout_change_should_fire_mouseover-manual.html",
      {}
     ]
    ],
+   "uievents/mouse/mouse_buttons_back_forward-manual.html": [
+    [
+     "/uievents/mouse/mouse_buttons_back_forward-manual.html",
+     {}
+    ]
+   ],
    "uievents/mouse/mouseevent_move_button-manual.html": [
     [
      "/uievents/mouse/mouseevent_move_button-manual.html",
      {}
     ]
    ],
    "uievents/order-of-events/focus-events/focus-contained-manual.html": [
     [
@@ -600781,16 +600787,20 @@
   "uievents/legacy/Event-subclasses-init.html": [
    "6b1d7bce96ca023959d5248aa8af0aa83c6d3aa5",
    "testharness"
   ],
   "uievents/mouse/layout_change_should_fire_mouseover-manual.html": [
    "4e96209d99278b974347c6bd636454b0e7daf3c4",
    "manual"
   ],
+  "uievents/mouse/mouse_buttons_back_forward-manual.html": [
+   "1688ee49394e0d96b0af131faeccc175b1723a8e",
+   "manual"
+  ],
   "uievents/mouse/mouseevent_move_button-manual.html": [
    "9cc673035fef3c2e8677e8d6679babfe8a1af854",
    "manual"
   ],
   "uievents/order-of-events/README.md": [
    "3a3e6ab77d25a8fe83085e24c0934e4b63eea553",
    "support"
   ],
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/uievents/mouse/mouse_buttons_back_forward-manual.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta charset="utf-8" />
+        <title>Mouse Button Back/Forward</title>
+        <link rel="author" title="Google" href="http://www.google.com/" />
+        <script src="/resources/testharness.js"></script>
+        <script src="/resources/testharnessreport.js"></script>
+        <script>
+            var testMouseUp = async_test('Tests that the mouseup is preventable.');
+            var received_back = false;
+            var received_forward = false;
+            window.addEventListener('mouseup', function(e) {
+              if (e.button == 3) {
+                received_back = true;
+                e.preventDefault();
+              } else if (e.button == 4) {
+                received_forward = true;
+                e.preventDefault();
+              }
+              if (received_back && received_forward) {
+                testMouseUp.done();
+              }
+            });
+        </script>
+
+    </head>
+    <body id="target">
+        <h4>Test Description: Tests that the mouseup event is prevented.
+            <ol>
+                <li>Click the back mouse button</li>
+                <li>Click the back mouse forward</li>
+            </ol>
+        </h4>
+    </body>
+</html>