Bug 1332279 - Test keyDown action for all WebDriver special keys; r?ato draft
authorMaja Frydrychowicz <mjzffr@gmail.com>
Sat, 01 Apr 2017 02:38:14 -0400
changeset 554622 919ce88077df2b81e09559aa5b0c5d9a8ca6cb9a
parent 554621 b5ccf1c0a50ec7901245bd77c0cc1d6da1c6a6ea
child 554623 e11de150160984e8be8fe57fac361cc13f5c9486
push id52015
push userbmo:mjzffr@gmail.com
push dateSat, 01 Apr 2017 07:12:08 +0000
reviewersato
bugs1332279
milestone55.0a1
Bug 1332279 - Test keyDown action for all WebDriver special keys; r?ato MozReview-Commit-ID: 5jyPCXnACTh
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/webdriver/actions/key.py
testing/web-platform/tests/webdriver/actions/special_keys.py
testing/web-platform/tests/webdriver/actions/support/keys.py
testing/web-platform/tests/webdriver/actions/support/test_actions_wdspec.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -130920,33 +130920,39 @@
     [
      "/webdriver/actions/conftest.py",
      {}
     ]
    ],
    "webdriver/actions/key.py": [
     [
      "/webdriver/actions/key.py",
-     {
-      "timeout": "long"
-     }
+     {}
     ]
    ],
    "webdriver/actions/mouse.py": [
     [
      "/webdriver/actions/mouse.py",
      {}
     ]
    ],
    "webdriver/actions/sequence.py": [
     [
      "/webdriver/actions/sequence.py",
      {}
     ]
    ],
+   "webdriver/actions/special_keys.py": [
+    [
+     "/webdriver/actions/special_keys.py",
+     {
+      "timeout": "long"
+     }
+    ]
+   ],
    "webdriver/conftest.py": [
     [
      "/webdriver/conftest.py",
      {}
     ]
    ],
    "webdriver/contexts.py": [
     [
@@ -163671,17 +163677,17 @@
    "7a5589f41ab8405d6ed09a4b83bd0c60e2a59677",
    "support"
   ],
   "editing/other/delete.html": [
    "c812df13215631719f8ff17eee4e0a854684670d",
    "testharness"
   ],
   "editing/other/extra-text-nodes.html": [
-   "79b4a278f0e35646cfdffeebf8f0523e2772bc9b",
+   "ae2676afe7fb739c9fe7f2557971d8c1e9b58fdc",
    "testharness"
   ],
   "editing/other/restoration.html": [
    "432d9d66ec7621faf22a31960816290193b60aed",
    "testharness"
   ],
   "editing/run/backcolor.html": [
    "72840bfcf7e62249773e925f79ba196218964373",
@@ -202275,17 +202281,17 @@
    "0a06c368a14c008c385c9df3cde35f090d96d58b",
    "testharness"
   ],
   "service-workers/service-worker/rejections.https.html": [
    "785a18ac3c8001034f583a8e97195aa47093bd0d",
    "testharness"
   ],
   "service-workers/service-worker/request-end-to-end.https.html": [
-   "1e2b1ee0455beeb2a609e927d2bf2655a9a801f6",
+   "e6df4bc5b1f399a059c80a2ce6d8787546165ff7",
    "testharness"
   ],
   "service-workers/service-worker/resource-timing.https.html": [
    "587060940cb25ff8072fa83cb41d538a73320ca6",
    "testharness"
   ],
   "service-workers/service-worker/resources/404.py": [
    "567d0a7de3ef54adaa8339bb04632a2ecfcc57a5",
@@ -202919,33 +202925,33 @@
    "05bcf6689d4dcdf0ecac796d8d2bed9020f4d29a",
    "testharness"
   ],
   "service-workers/service-worker/shared-worker-controlled.https.html": [
    "031461c53701b922149fb481775e7afdce6fc7c6",
    "testharness"
   ],
   "service-workers/service-worker/skip-waiting-installed.https.html": [
-   "d668e51387bb680aeb0508a52f4fe73cbc56a552",
+   "8fb4d399affcfcc24b541e63390a94edf64bb771",
    "testharness"
   ],
   "service-workers/service-worker/skip-waiting-using-registration.https.html": [
-   "3418673911e8c1424f67f5a6ff1f0370a9fa7e26",
+   "140a5a9c801c9d65a0fda0ea341fa00035fad1f8",
    "testharness"
   ],
   "service-workers/service-worker/skip-waiting-without-client.https.html": [
    "dfb945cfd633272d96e79b6679263b2d6b4aa8a1",
    "testharness"
   ],
   "service-workers/service-worker/skip-waiting-without-using-registration.https.html": [
-   "2460eb074582e031701732392dd9cfc8b771816a",
+   "fbae21429467d4a19b6020542460a3ad465def63",
    "testharness"
   ],
   "service-workers/service-worker/skip-waiting.https.html": [
-   "4f00e2fbd9c5520cabcc019c68f7f1de50221cca",
+   "67ce73166e334af7658179373a6dbb8cdc48f230",
    "testharness"
   ],
   "service-workers/service-worker/state.https.html": [
    "ecb0e2fd22e7c92a98ae612a2032a92edf8520d9",
    "testharness"
   ],
   "service-workers/service-worker/synced-state.https.html": [
    "38d80bd51f81c549bb718e0a37370eeaa6c18f91",
@@ -208135,41 +208141,45 @@
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/actions/conftest.py": [
    "78b6434a88021b7f56e5a7bf3e858fc9558a7c19",
    "wdspec"
   ],
   "webdriver/actions/key.py": [
-   "bbb767c5b75b961d7eeed8960200276fb10fbd03",
+   "7d3308182ea94f37c221a8f88392f129bb6d328c",
    "wdspec"
   ],
   "webdriver/actions/mouse.py": [
    "640ae3074200938ad63f77627d6645efa8c5716e",
    "wdspec"
   ],
   "webdriver/actions/sequence.py": [
    "d80f382863e52ff223db735a2a551197e570774f",
    "wdspec"
   ],
+  "webdriver/actions/special_keys.py": [
+   "b2d6c2fa8852c6299b6bd214f67007efebe3029a",
+   "wdspec"
+  ],
   "webdriver/actions/support/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/actions/support/keys.py": [
-   "85bfdbd3203166c2b84616cc1936f6dd98f8de3b",
+   "636991372c21e52b623ed4ada9dfb675dd7f7e14",
    "support"
   ],
   "webdriver/actions/support/refine.py": [
    "0d244bffe67ef57be68aad99f1cbc7440ff80e27",
    "support"
   ],
   "webdriver/actions/support/test_actions_wdspec.html": [
-   "63b5de5ab6c7a00717663a18c3b4d79857ee2136",
+   "ccd55308840f1b7ab6e9c56b7123b9ac370f0d25",
    "support"
   ],
   "webdriver/conftest.py": [
    "39ba7649c437b50bb97d766561e4bd5a110f6459",
    "wdspec"
   ],
   "webdriver/contexts.py": [
    "302a1a0cb246aef74f2c1d961a210d9de7e366c5",
--- a/testing/web-platform/tests/webdriver/actions/key.py
+++ b/testing/web-platform/tests/webdriver/actions/key.py
@@ -1,50 +1,23 @@
-# META: timeout=long
-
 import pytest
 
 from support.keys import Keys
-from support.refine import get_keys, filter_dict, get_events
+from support.refine import filter_dict, get_keys, get_events
 
 
 def test_lone_keyup_sends_no_events(session, key_reporter, key_chain):
     key_chain.key_up("a").perform()
     assert len(get_keys(key_reporter)) == 0
     assert len(get_events(session)) == 0
     session.actions.release()
     assert len(get_keys(key_reporter)) == 0
     assert len(get_events(session)) == 0
 
 
-# TODO - the harness bails with TIMEOUT before all these subtests complete
-# The timeout is per file, so move to separate file with longer timeout?
-# Need a way to set timeouts in py files (since can't do html meta)
-# @pytest.mark.parametrize("name,expected", ALL_EVENTS.items())
-# def test_webdriver_special_key_sends_keydown(session,
-#                                              key_reporter,
-#                                              key_chain,
-#                                              name,
-#                                              expected):
-#     key_chain.key_down(getattr(Keys, name)).perform()
-#     # only interested in keydown
-#     first_event = get_events(session)[0]
-#     # make a copy so we throw out irrelevant keys and compare to events
-#     expected = dict(expected)
-#     del expected["value"]
-#     # check and remove keys that aren't in expected
-#     assert first_event["type"] == "keydown"
-#     assert first_event["repeat"] == False
-#     first_event = filter_dict(first_event, expected)
-#     assert first_event == expected
-#     # check that printable character was recorded in input field
-#     if len(expected["key"]) == 1:
-#         assert get_keys(key_reporter) == expected["key"]
-
-
 @pytest.mark.parametrize("value,code", [
     (u"a", "KeyA",),
     ("a", "KeyA",),
     (u"\"", "Quote"),
     (u",", "Comma"),
     (u"\u00E0", ""),
     (u"\u0416", ""),
     (u"@", "Digit2"),
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/webdriver/actions/special_keys.py
@@ -0,0 +1,32 @@
+# META: timeout=long
+
+import pytest
+from support.keys import ALL_EVENTS, Keys
+from support.refine import filter_dict, get_keys, get_events
+
+
+@pytest.mark.parametrize("name,expected", ALL_EVENTS.items())
+def test_webdriver_special_key_sends_keydown(session,
+                                             key_reporter,
+                                             key_chain,
+                                             name,
+                                             expected):
+    key_chain.key_down(getattr(Keys, name)).perform()
+    # only interested in keydown
+    first_event = get_events(session)[0]
+    # make a copy so we can throw out irrelevant keys and compare to events
+    expected = dict(expected)
+
+
+    del expected["value"]
+    # check and remove keys that aren't in expected
+    assert first_event["type"] == "keydown"
+    assert first_event["repeat"] == False
+    first_event = filter_dict(first_event, expected)
+    assert first_event == expected
+    # only printable characters should be recorded in input field
+    entered_keys = get_keys(key_reporter)
+    if len(expected["key"]) == 1:
+        assert entered_keys == expected["key"]
+    else:
+        assert len(entered_keys) == 0
--- a/testing/web-platform/tests/webdriver/actions/support/keys.py
+++ b/testing/web-platform/tests/webdriver/actions/support/keys.py
@@ -112,701 +112,631 @@ ALL_EVENTS = {
     "ADD": {
         "code": "",
         "ctrl": False,
         "key": "+",
         "location": 3,
         "meta": False,
         "shift": False,
         "value": u"\ue025",
-        "which": 0,
     },
     "ALT": {
         "code": "AltLeft",
         "ctrl": False,
         "key": "Alt",
         "location": 1,
         "meta": False,
         "shift": False,
         "value": u"\ue00a",
-        "which": 0,
     },
     "BACKSPACE": {
         "code": "Backspace",
         "ctrl": False,
         "key": "Backspace",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue003",
-        "which": 0,
     },
     "CANCEL": {
         "code": "",
         "ctrl": False,
         "key": "Cancel",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue001",
-        "which": 0,
     },
     "CLEAR": {
         "code": "",
         "ctrl": False,
         "key": "Clear",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue005",
-        "which": 0,
     },
     "CONTROL": {
         "code": "ControlLeft",
         "ctrl": True,
         "key": "Control",
         "location": 1,
         "meta": False,
         "shift": False,
         "value": u"\ue009",
-        "which": 0,
     },
     "DECIMAL": {
         "code": "NumpadDecimal",
         "ctrl": False,
         "key": ".",
         "location": 3,
         "meta": False,
         "shift": False,
         "value": u"\ue028",
-        "which": 0,
     },
     "DELETE": {
         "code": "Delete",
         "ctrl": False,
         "key": "Delete",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue017",
-        "which": 0,
     },
     "DIVIDE": {
         "code": "NumpadDivide",
         "ctrl": False,
         "key": "/",
         "location": 3,
         "meta": False,
         "shift": False,
         "value": u"\ue029",
-        "which": 0,
     },
     "DOWN": {
         "code": "ArrowDown",
         "ctrl": False,
         "key": "ArrowDown",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue015",
-        "which": 0,
     },
     "END": {
         "code": "End",
         "ctrl": False,
         "key": "End",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue010",
-        "which": 0,
     },
     "ENTER": {
         "code": "NumpadEnter",
         "ctrl": False,
         "key": "Enter",
         "location": 1,
         "meta": False,
         "shift": False,
         "value": u"\ue007",
-        "which": 0,
     },
     "EQUALS": {
         "code": "",
         "ctrl": False,
         "key": "=",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue019",
-        "which": 0,
     },
     "ESCAPE": {
         "code": "Escape",
         "ctrl": False,
         "key": "Escape",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue00c",
-        "which": 0,
     },
     "F1": {
         "code": "F1",
         "ctrl": False,
         "key": "F1",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue031",
-        "which": 0,
     },
     "F10": {
         "code": "F10",
         "ctrl": False,
         "key": "F10",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue03a",
-        "which": 0,
     },
     "F11": {
         "code": "F11",
         "ctrl": False,
         "key": "F11",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue03b",
-        "which": 0,
     },
     "F12": {
         "code": "F12",
         "ctrl": False,
         "key": "F12",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue03c",
-        "which": 0,
     },
     "F2": {
         "code": "F2",
         "ctrl": False,
         "key": "F2",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue032",
-        "which": 0,
     },
     "F3": {
         "code": "F3",
         "ctrl": False,
         "key": "F3",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue033",
-        "which": 0,
     },
     "F4": {
         "code": "F4",
         "ctrl": False,
         "key": "F4",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue034",
-        "which": 0,
     },
     "F5": {
         "code": "F5",
         "ctrl": False,
         "key": "F5",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue035",
-        "which": 0,
     },
     "F6": {
         "code": "F6",
         "ctrl": False,
         "key": "F6",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue036",
-        "which": 0,
     },
     "F7": {
         "code": "F7",
         "ctrl": False,
         "key": "F7",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue037",
-        "which": 0,
     },
     "F8": {
         "code": "F8",
         "ctrl": False,
         "key": "F8",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue038",
-        "which": 0,
     },
     "F9": {
         "code": "F9",
         "ctrl": False,
         "key": "F9",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue039",
-        "which": 0,
     },
     "HELP": {
         "code": "Help",
         "ctrl": False,
         "key": "Help",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue002",
-        "which": 0,
     },
     "HOME": {
         "code": "Home",
         "ctrl": False,
         "key": "Home",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue011",
-        "which": 0,
     },
     "INSERT": {
         "code": "Insert",
         "ctrl": False,
         "key": "Insert",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue016",
-        "which": 0,
     },
     "LEFT": {
         "code": "ArrowLeft",
         "ctrl": False,
         "key": "ArrowLeft",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue012",
-        "which": 0,
     },
     "META": {
         "code": "OSLeft",
         "ctrl": False,
         "key": "Meta",
         "location": 1,
         "meta": True,
         "shift": False,
         "value": u"\ue03d",
-        "which": 0,
     },
     "MULTIPLY": {
         "code": "NumpadMultiply",
         "ctrl": False,
         "key": "*",
         "location": 3,
         "meta": False,
         "shift": False,
         "value": u"\ue024",
-        "which": 0,
     },
     "NULL": {
         "code": "",
         "ctrl": False,
         "key": "Unidentified",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue000",
-        "which": 0,
     },
     "NUMPAD0": {
         "code": "Numpad0",
         "ctrl": False,
         "key": "0",
         "location": 3,
         "meta": False,
         "shift": False,
         "value": u"\ue01a",
-        "which": 0,
     },
     "NUMPAD1": {
         "code": "Numpad1",
         "ctrl": False,
         "key": "1",
         "location": 3,
         "meta": False,
         "shift": False,
         "value": u"\ue01b",
-        "which": 0,
     },
     "NUMPAD2": {
         "code": "Numpad2",
         "ctrl": False,
         "key": "2",
         "location": 3,
         "meta": False,
         "shift": False,
         "value": u"\ue01c",
-        "which": 0,
     },
     "NUMPAD3": {
         "code": "Numpad3",
         "ctrl": False,
         "key": "3",
         "location": 3,
         "meta": False,
         "shift": False,
         "value": u"\ue01d",
-        "which": 0,
     },
     "NUMPAD4": {
         "code": "PageDown",
         "ctrl": False,
         "key": "4",
         "location": 3,
         "meta": False,
         "shift": False,
         "value": u"\ue01e",
-        "which": 0,
     },
     "NUMPAD5": {
         "code": "PageUp",
         "ctrl": False,
         "key": "5",
         "location": 3,
         "meta": False,
         "shift": False,
         "value": u"\ue01f",
-        "which": 0,
     },
     "NUMPAD6": {
         "code": "Numpad6",
         "ctrl": False,
         "key": "6",
         "location": 3,
         "meta": False,
         "shift": False,
         "value": u"\ue020",
-        "which": 0,
     },
     "NUMPAD7": {
         "code": "Numpad7",
         "ctrl": False,
         "key": "7",
         "location": 3,
         "meta": False,
         "shift": False,
         "value": u"\ue021",
-        "which": 0,
     },
     "NUMPAD8": {
         "code": "Numpad8",
         "ctrl": False,
         "key": "8",
         "location": 3,
         "meta": False,
         "shift": False,
         "value": u"\ue022",
-        "which": 0,
     },
     "NUMPAD9": {
         "code": "Numpad9",
         "ctrl": False,
         "key": "9",
         "location": 3,
         "meta": False,
         "shift": False,
         "value": u"\ue023",
-        "which": 0,
     },
     "PAGE_DOWN": {
         "code": "",
         "ctrl": False,
         "key": "PageDown",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue00f",
-        "which": 0,
     },
     "PAGE_UP": {
         "code": "",
         "ctrl": False,
         "key": "PageUp",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue00e",
-        "which": 0,
     },
     "PAUSE": {
         "code": "",
         "ctrl": False,
         "key": "Pause",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue00b",
-        "which": 0,
     },
     "RETURN": {
         "code": "Enter",
         "ctrl": False,
-        "key": "Return",
+        "key": "Enter",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue006",
-        "which": 0,
     },
     "RIGHT": {
         "code": "ArrowRight",
         "ctrl": False,
         "key": "ArrowRight",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue014",
-        "which": 0,
     },
     "R_ALT": {
         "code": "AltRight",
         "ctrl": False,
         "key": "Alt",
         "location": 2,
         "meta": False,
         "shift": False,
         "value": u"\ue052",
-        "which": 0,
     },
     "R_ARROWDOWN": {
         "code": "Numpad2",
         "ctrl": False,
         "key": "ArrowDown",
         "location": 3,
         "meta": False,
         "shift": False,
         "value": u"\ue05b",
-        "which": 0,
     },
     "R_ARROWLEFT": {
         "code": "Numpad4",
         "ctrl": False,
         "key": "ArrowLeft",
         "location": 3,
         "meta": False,
         "shift": False,
         "value": u"\ue058",
-        "which": 0,
     },
     "R_ARROWRIGHT": {
         "code": "Numpad6",
         "ctrl": False,
         "key": "ArrowRight",
         "location": 3,
         "meta": False,
         "shift": False,
         "value": u"\ue05a",
-        "which": 0,
     },
     "R_ARROWUP": {
         "code": "Numpad8",
         "ctrl": False,
         "key": "ArrowUp",
         "location": 3,
         "meta": False,
         "shift": False,
         "value": u"\ue059",
-        "which": 0,
     },
     "R_CONTROL": {
         "code": "ControlRight",
         "ctrl": True,
         "key": "Control",
         "location": 2,
         "meta": False,
         "shift": False,
         "value": u"\ue051",
-        "which": 0,
     },
     "R_DELETE": {
         "code": "NumpadDecimal",
         "ctrl": False,
         "key": "Delete",
         "location": 3,
         "meta": False,
         "shift": False,
         "value": u"\ue05d",
-        "which": 0,
     },
     "R_END": {
         "code": "Numpad1",
         "ctrl": False,
         "key": "End",
         "location": 3,
         "meta": False,
         "shift": False,
         "value": u"\ue056",
-        "which": 0,
     },
     "R_HOME": {
         "code": "Numpad7",
         "ctrl": False,
         "key": "Home",
         "location": 3,
         "meta": False,
         "shift": False,
         "value": u"\ue057",
-        "which": 0,
     },
     "R_INSERT": {
         "code": "Numpad0",
         "ctrl": False,
         "key": "Insert",
         "location": 3,
         "meta": False,
         "shift": False,
         "value": u"\ue05c",
-        "which": 0,
     },
     "R_META": {
         "code": "OSRight",
         "ctrl": False,
         "key": "Meta",
         "location": 2,
         "meta": True,
         "shift": False,
         "value": u"\ue053",
-        "which": 0,
     },
     "R_PAGEDOWN": {
         "code": "Numpad3",
         "ctrl": False,
         "key": "PageDown",
         "location": 3,
         "meta": False,
         "shift": False,
         "value": u"\ue055",
-        "which": 0,
     },
     "R_PAGEUP": {
         "code": "Numpad9",
         "ctrl": False,
         "key": "PageUp",
         "location": 3,
         "meta": False,
         "shift": False,
         "value": u"\ue054",
-        "which": 0,
     },
     "R_SHIFT": {
         "code": "ShiftRight",
         "ctrl": False,
         "key": "Shift",
         "location": 2,
         "meta": False,
         "shift": True,
         "value": u"\ue050",
-        "which": 0,
     },
     "SEMICOLON": {
         "code": "",
         "ctrl": False,
         "key": ";",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue018",
-        "which": 0,
     },
     "SEPARATOR": {
         "code": "NumpadSubtract",
         "ctrl": False,
         "key": ",",
         "location": 3,
         "meta": False,
         "shift": False,
         "value": u"\ue026",
-        "which": 0,
     },
     "SHIFT": {
         "code": "ShiftLeft",
         "ctrl": False,
         "key": "Shift",
         "location": 1,
         "meta": False,
         "shift": True,
         "value": u"\ue008",
-        "which": 0,
     },
     "SPACE": {
         "code": "Space",
         "ctrl": False,
         "key": " ",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue00d",
-        "which": 0,
     },
     "SUBTRACT": {
         "code": "",
         "ctrl": False,
         "key": "-",
         "location": 3,
         "meta": False,
         "shift": False,
         "value": u"\ue027",
-        "which": 0,
     },
     "TAB": {
         "code": "Tab",
         "ctrl": False,
         "key": "Tab",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue004",
-        "which": 0,
     },
     "UP": {
         "code": "ArrowUp",
         "ctrl": False,
         "key": "ArrowUp",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue013",
-        "which": 0,
     },
     "ZENKAKUHANKAKU": {
         "code": "",
         "ctrl": False,
         "key": "ZenkakuHankaku",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue040",
-        "which": 0,
     }
 }
--- a/testing/web-platform/tests/webdriver/actions/support/test_actions_wdspec.html
+++ b/testing/web-platform/tests/webdriver/actions/support/test_actions_wdspec.html
@@ -53,17 +53,18 @@
             "meta": event.metaKey,
             "shift": event.shiftKey,
             "repeat": event.repeat,
             "type": event.type
           });
           appendMessage(`${event.type}(` +
               `code: ${event.code}, ` +
               `key: ${key}, ` +
-              `which: ${event.which})`);
+              `which: ${event.which}, ` +
+              `keyCode: ${event.keyCode})`);
         }
 
         function recordPointerEvent(event) {
           allEvents.events.push({
             "type": event.type,
             "button": event.button,
             "buttons": event.buttons,
             "pageX": event.pageX,